Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Trick 80

Status
Not open for further replies.

CasperTFG

Programmer
Nov 15, 2001
1,210
0
0
US
I have been programming for 8 years now and I just learned this trick... Think of the hours I could have save, especially since I type with 2 fingers.. LOL Just Kidding.

If you have a big long variable name or the like, something like m_GetEmptyRecordForProblemFromServerDatabase

Trying to remember or re-type that is near impossible. Instead. Start to type it. So start typing m_Get then hold down CTRL and Space. VB will complete the word for you, or give you a drop down list of possibles.



Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
You found that by accident didn't you? I have been wondering if that was possible! Great. Any day you learn something new is a good day. Of course any day you wake up is a good day too. S
 
No the newbie that came to work here straight out off college showed me...

Nothing compares to the enginuity of youth trying to find short cuts.

Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
Ohhh, I like this!!! [love2]
 
If I remember correctly, when I started doing VB, I also discovered this feature first by accident[smile]. Later on, I came to know that this is the Complete Word feature and the [tt]A->[/tt] button on Edit toolbar also does the same.
 
This is too good to keep for yourselves so I'll just borrow the thread for the VBA forum!

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
There are loads of these lesser-known tricks. Two of my other favourites are SHIFT-F2, which will jump the editor to the code that defines any procedure or function that the cursor is currently on, and F6 which will jmp the cursor from window to window if you are working in split window mode
 

Another one is...
CTRL+Tab or CTRL+F6 Will cycle through all open windows and to go back CTRL+SHIFT+Tab.
 
One of my favourites is the Ctrl Shift F2, returns you back to where you were when you did Shift F2. Also multiple jumps/returns are nested.
 
I remember back in ummm think it was 92 when a Sgt down stairs, non IT type, hit Alt-Tab in windows 3.1 and I was like "WOW! What program do you have to do that?!?!" hehehe
One of the best things about being an instructor was having students show me cool little tricks.

One that I use a lot, outside of vb, these days is Ctrl-Shift-Esc to bring up task mgr directly.
 
Ctrl-Shift-Esc is nice for bringing up the task manager, but you know what else works well for that? Ctrl-Alt-Del at least in win xp/2k/nt

Windows Key/Break to bring up the properties of My Computer
Windows Key/F for search dialog
Windows Key/E for My Computer
and my all time favorite:
Windows Key/L to lock the computer and put it at the welcome screen. Works especially well when your little brother won't keep his rotten, stinkin'... ok, sorry.

Sirskydive
 
Doesn't windows key/L log off?

Transcend
[gorgeous]
 
problem with Ctrl-Alt-Del to bring up task mgr is that it clears your destop and you still have to select it from the buttons 8). I'm lazy.
Window R for "RUN"
 
One of my personal favourits is Ctrl-Y which cuts the line you are in to the clipboard without having to mark the whole line.
 
Mark all text from the cursor to the end of a proceedure:
CTRL-SHIFT-PGDWN

Same, but for the Module:
CTRL-SHIFT-END

Same but for a single word:
CTRL-RIGHTARROW

To just move to the ends, with-out marking, do not press the shift.

These can be done in reverse using HOME or LEFTARROW.

SHIFT-END to mark a line.

So many more shortcuts.

Check out this for a more complete list:

 
Every time I search the index topic "Code Window" (Code window, shortcut keys) in Visual Basic Documentation VB6, I find 1 or 2 key board short cuts which are very useful.
 

BTW, some shortcut keys work only under certain conditions.
Such as CTRL+SHIFT+I or CTRL+I or CTRL+J
Place the cursor on a function/sub name, a variable or a constant and press:

CTRL+SHIFT+I Parameter Info for a proceedure
CTRL+I Quick Info - all
CTRL+J List Properties/Methods for an object
CTRL+SHIFT+J List Constants for Enums
 
Hi
I know most of the shortcut keys listed here relate to VB (and therefore probably VBA) and Windows which is why I've linked to this thread from the VBA forum - but for those who use Office apps (particularly Excel) I posted this some time ago in the Office forum as a list of shortcuts.

thread68-463686

Just in case your interested!!
Happy Friday
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
 
To SemperFiDownUnder:
When you hit ctrl-alt-del in windows xp it doesn't stop the rest of the computer from running such as in windows 9x environment. I like the changes that have been made to it. It's very nifty.
Lot's of great tips. My favorite of all is setting the option for what you see when you start vb. You can set it to see the open/new list. you can choose from existing or recent projects, or you can start a new project as soon as you open it. That is a time saver because you don't have to keep opening that from the file menu every time you start vb.
 
i think what semperfi meant was in 2k pro when you hit C-A-D you go bluescreen with a windows security form and still have to click task manager button

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
File Formats Galore @
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top