F5 in Run Mode with Focus on Main Menu Bar Acts as CTRL+BREAK

ID Number: Q74348

1.00

WINDOWS

Summary:

A Visual Basic program will break at run time under the following

simultaneous conditions:

1. You run the program in the Visual Basic development environment.

2. The Visual Basic menu bar has the focus.

3. You press F5.

The program will break when the F5 key is pressed and the Immediate

Window will get the focus. This is not a problem with Visual Basic,

but rather a design feature.

This information only applies to an application run in the Visual

Basic development environment, not as an .EXE program.

This information applies to Visual Basic programming system version

1.0 for Windows

More Information:

The F5 key acts as the shortcut key for the Visual Basic Run menu.

Because Start, Continue, and Break all share the same menu item under

the Run menu, F5 acts differently depending upon the state of

execution of a program. It acts as the Run key in the Visual Basic

1.0 environment. It also serves as the Break key once the application

is running and the focus is on the Visual Basic menu bar. After

execution has been "broken" with the break key, the F5 key serves as

the Continue key.

To demonstrate the different modes of the F5 key, do the following:

1. Run Visual Basic.

2. From the File menu, select New Project (ALT, F, N).

3. Press F5 to run the program.

4. Using the mouse, click on the Visual Basic menu bar.

5. Press F5 to break the program. The Immediate window will be given

the focus after you press F5.

6. Press F5 again to continue execution of the program.

Additional reference words: 1.00