Microsoft KB Archive/74348

= PRB: F5 in Run Mode w/ Focus on Main Menu Bar Acts as CTRL+BREAK =

Article ID: 74348

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 Q74348



SYMPTOMS
A Microsoft Visual Basic for Windows program will break at run time under the following simultaneous conditions:


 * 1) You run the program in the Visual Basic for Windows development environment.
 * 2) The Visual Basic for Windows menu bar has the focus.
 * 3) You press the F5 key.



STATUS
This behavior is by design. The program will break when the F5 key is pressed and the Immediate Window will get the focus. This information only applies to an application run in the Visual Basic for Windows development environment, not as an .EXE program.



MORE INFORMATION
The F5 key acts as the shortcut key for the Visual Basic for Windows 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 version 1.0 for Windows environment. It also serves as the Break key once the application is running and the focus is on the Visual Basic for Windows menu bar. After execution has been &quot;broken&quot; 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 for Windows.
 * 2) From the File menu, select New Project (press ALT, F, N).
 * 3) Press the F5 key to run the program.
 * 4) Using the mouse, click the Visual Basic for Windows menu bar.
 * 5) Press the F5 key to break the program. The Immediate window will be given the focus after you press the F5 key.
 * 6) Press the F5 key again to continue execution of the program.

Additional query words: 2.00 3.00

Keywords: kbprb KB74348

-

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

© Microsoft Corporation. All rights reserved.