Click here to Skip to main content
Licence 
First Posted 14 May 2000
Views 57,586
Bookmarked 6 times

A handy keyobard shortcut for "Double Click" on VC6 IDE

By | 3 Jun 2000 | Article
Mark a word in VC6 without leaving the keyboard to double click with the mouse.

Introduction

This is very handy keyboard shortcut which started with the need to mark and select a word inside the IDE of VC6 without having to take my hand from the keyboard and use the mouse. In order to do that with the standard IDE commands of VC6 IDE one needs to use a couple of keyboard shortcuts. For example, when the cursor is in the middle of a word one has to press Ctrl + left arrow to go to the beginning of the word and then press Shift+Ctrl and right arrow to select the word, or double click the word with the mouse.

The following is a macro that does the above. I personally assigned it on the Ctrl+= shortcut because it was available.

Here is the code:

Sub doubleclick()
'DESCRIPTION: For simulated double clicking

'Begin Recording
	ActiveDocument.Selection.WordLeft
	ActiveDocument.Selection.WordRight dsExtend
'End Recording
End Sub

All you have to do is copy the above routine inside your macro file and assign a keyboard shortcut for it.

For those who don't know how to do that follow these instructions:

  • Open VC6. Go to the "Tools" menu, select "Macro".
  • Copy the above code.
  • On the dialog box that appears on the screen press "Edit".
  • Enter the name of the macro (in this case doubleclick) and the description "For simulated double clicking".
  • A file will open and the cursor will be right under the DESCRIPTION part of the function. Select the whole function and paste over it the above code.
  • When you finish save the file and close it.

To assign a keyboard shortcut select again the "Macro" option from the "Tools" menu. Select the "doubleclick" macro, press the "Options>>" button and then the "Keystrokes" button. On the dialog box that appears select the "doubleclick" macro and put the cursor on the "Press new shortcut key" field. Press the desired shortcut key (Ctrl + = worked for me).

If the shortcut you pressed is already assigned then under the field you get a message. In that case delete whatever you pressed and try a new shortcut. You won't believe how many keyboard shortcuts are already assigned for the IDE.

If the shortcut is not assigned then press close and you are ready.

Enjoy programming!!!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Alberto Bar-Noy

Team Leader
www.unitronics.com
Israel Israel

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalshort cut PinmemberS Ganapathi Raman20:58 8 Apr '02  
GeneralBetter Do such thing PinmemberAlex Kucherenko3:22 14 Dec '01  
GeneralSome problems PinsussIgor Proskuriakov0:40 15 Jun '00  
GeneralRe: Some problems PinmemberPhlip11:42 21 Nov '02  
Questionctrl-shift-left arrow? Pinsussnobody11:11 5 Jun '00  
AnswerRe: ctrl-shift-left arrow? PinsussAlberto Gattegno23:31 6 Jun '00  
GeneralSometimes fails PinsussZzynx4:34 5 Jun '00  
GeneralRe: Sometimes fails PinsussAlberto Gattegno6:18 5 Jun '00  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 4 Jun 2000
Article Copyright 2000 by Alberto Bar-Noy
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid