Using PAGE DOWN and PAGE UP Keys Within VB.EXE Environment

ID Number: Q76559

1.00

WINDOWS

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.

This information applies to Microsoft Visual Basic programming system

version 1.0 for Windows.

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 Visual Basic with a New Project.

2. Place some command buttons or any other objects on the form.

3. Double-click on the form to bring up the Code window.

4. Place code within the various event procedures. For example,

place some various Print statements in the following event

procedures:

- Form_Click

- Command1_Click

- Label1_Click

- Form_Load

(Note that you will need to have a command button and a label

placed on Form1 before adding Print statements in the event

procedures mentioned above.)

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

-----------------------------

The F1 function key 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" under Help in

the VB.EXE environment, and search for "system keys" in the Windows

Help.

Additional reference words: 1.00