PAGE UP, PAGE DOWN, & Other Shortcut Keys in VB Environment (76559)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Visual Basic Standard Edition for Windows 1.0

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:

  1. Start a new project in Visual Basic.
  2. Place some command buttons or any other objects on the form.
  3. Double-click the form to bring up the Code window.
  4. 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.
  5. 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.
  6. 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.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:KB76559