Click here to Skip to main content
Click here to Skip to main content

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

, 3 Jun 2000
Rate this:
Please Sign up or sign in to vote.
Mark a word in VC6 without leaving the keyboard to double click with the mouse.
<!-- Add the rest of your HTML here -->

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

Share

About the Author

Alberto Bar-Noy
Team Leader www.unitronics.com
Israel Israel
No Biography provided

Comments and Discussions

 
Generalshort cut PinmemberS Ganapathi Raman8-Apr-02 20:58 
GeneralBetter Do such thing PinmemberAlex Kucherenko14-Dec-01 3:22 
GeneralSome problems PinsussIgor Proskuriakov15-Jun-00 0:40 
GeneralRe: Some problems PinmemberPhlip21-Nov-02 11:42 
Questionctrl-shift-left arrow? Pinsussnobody5-Jun-00 11:11 
AnswerRe: ctrl-shift-left arrow? PinsussAlberto Gattegno6-Jun-00 23:31 
GeneralSometimes fails PinsussZzynx5-Jun-00 4:34 
GeneralRe: Sometimes fails PinsussAlberto Gattegno5-Jun-00 6:18 

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.

| Advertise | Privacy | Mobile
Web03 | 2.8.141015.1 | Last Updated 4 Jun 2000
Article Copyright 2000 by Alberto Bar-Noy
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid