The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for
Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0
SUMMARY
At design time in the Code window of the Visual Basic programming
environment (VB.EXE), you can use the PAGE DOWN and PAGE UP keys as
shortcut keys to go from one event procedure to another. Other helpful
shortcut keys are listed below.
MORE INFORMATION
Below is an example that demonstrates certain conditions you need to follow
before you can use the PAGE DOWN and PAGE UP shortcut keys to their fullest
potential in the Code window:
- Start a new project in Visual Basic.
- Place some command buttons or any other objects on the form.
- Double-click the form to bring up the Code window.
- Place code within the various event procedures. For example, place Print
statements in the following event procedures:
- Form_Click
- Command1_Click
- Label1_Click
- Form_Load
Note: You need to place a command button and a label on Form1 before
adding Print statements in these event procedures.
- Press the PAGE DOWN or PAGE UP key and notice how the VB.EXE
environment moves from one event procedure to another. The PAGE
DOWN and PAGE UP work in a such a way that you are looking at the
event procedures in an alphabetic order, except that the
"(general)" event procedure is always on the top of the list even
if it contains no code.
- Notice that only the event procedures that contain code are displayed.
Also note that PAGE DOWN and PAGE UP wrap around continuously. To
activate PAGE UP and PAGE DOWN, the focus (the I-beam mouse pointer)
must be in the Code window. When you have pages of code within an event
procedure, there are times when the PAGE DOWN and PAGE UP seem to
perform differently, but you need to visualize paging up or down a
listing of event procedures in a printout to see how these routines are
designed to work.
Other Shortcut Keys in VB.EXE
Here are additional shortcut keys you can use in the Visual Basic
environment:
- F1 invokes Visual Basic Help. When you receive an error after pressing
the F5 key to run your code, you can press the F1 key to get additional
information on that error.
- F5 is the shortcut key to run a program.
- F7 activates the Code window.
- ALT+PRINT SCREEN is a Windows feature to copy the active window into
the Clipboard.
- PRINT SCREEN copies the entire screen into the Clipboard.
- CTRL+INSERT copies selected text into the Clipboard.
- F8 single-steps through a program in the VB.EXE environment.
- F9 toggles breakpoints on and off.
- F12 chooses the Save Project As command from the File menu.
For additional shortcut keys, search for "shortcuts" in the Help menu in
the VB.EXE environment, and search for "system keys" in the Windows Help.
|