Microsoft KB Archive/76559

= PAGE UP, PAGE DOWN, & Other Shortcut Keys in VB Environment =

Article ID: 76559

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q76559



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</li> Form_Load</li></ul>

NOTE: You need to place a command button and a label on Form1 before adding Print statements in these event procedures.</li> 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 &quot;(general)&quot; event procedure is always on the top of the list even if it contains no code.</li> 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.</li></ol>

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 &quot;shortcuts&quot; in the Help menu in the VB.EXE environment, and search for &quot;system keys&quot; in the Windows Help.

Additional query words: 2.00 3.00

Keywords: KB76559

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.