The Three Program Modes


[Page 627 (continued)]

At any time, a program is in one of three modesdesign mode, run mode, or debug mode. (Debug mode is also known as break mode.) When the current mode is "run" or "debug," the words "Running" or "Debugging" are displayed (in parentheses) in the Visual Basic title bar. The absence of these words indicates that the current mode is "design."


[Page 628]

(This item is displayed on page 627 in the print version)

Title bar and toolbars during design mode.

Title bar and toolbars during run mode.

Title bar and toolbars during debug mode.


With the program in design mode, you place controls on a form, set their initial properties, and write code. Run mode is initiated by pressing F5 or the Start button. Debug mode is invoked automatically when a run-time error occurs. You can use Debug options to break the program at specified places. While the program is in debug mode, you can hover the cursor over any variable to obtain its current value. Also, you can use the debugging windows, such as the Immediate, Watch, and Locals windows, to examine values of expressions. When you enter debug mode, the Toolbar contains a Continue button. You can click on it to continue with the execution of the program.




An Introduction to Programming Using Visual Basic 2005
Introduction to Programming Using Visual Basic 2005, An (6th Edition)
ISBN: 0130306541
EAN: 2147483647
Year: 2006
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net