19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

B. Remove all breakpoints.<br />

1. Press Alt/D/C or Ctrl+Shift+F9.<br />

C. Run a program one statement at a time.<br />

1. Press F8. The first executable statement will be highlighted. (An event must<br />

first occur for which an event procedure has been written.)<br />

2. Press F8 each time you want to execute the currently highlighted statement.<br />

Note: You will probably need to press Alt+Tab to switch back <strong>and</strong> forth between the<br />

form <strong>and</strong> the VB environment. Also, to guarantee that output is retained while stepping<br />

through the program, the AutoRedraw property of the form <strong>and</strong> any picture<br />

boxes may need to be set to True.<br />

D. Run the program one statement at a time, but execute each general procedure call<br />

without stepping through the statements in the procedure one at a time.<br />

1. Press Shift+F8. The first executable statement will be highlighted.<br />

2. Press Shift+F8 each time you want to execute the currently highlighted statement.<br />

E. Continue execution of a program that has been suspended.<br />

1. Press F5.<br />

Note: Each time an attempt is made to change a suspended program in a way that<br />

would prevent the program from continuing, <strong>Visual</strong> <strong>Basic</strong> displays a dialog box<br />

warning that the program will have to be restarted from the beginning <strong>and</strong> gives the<br />

option to cancel the attempted change.<br />

F. Have further stepping begin at the line containing the cursor (no variables are<br />

cleared).<br />

1. Press Alt/D/R or Ctrl+F8.<br />

G. Set the next statement to be run in the current procedure.<br />

1. Place the cursor anywhere in the desired statement.<br />

2. Press Alt/D/N or Ctrl+F9.<br />

H. Determine the value of an expression during run time.<br />

1. Press Alt/D/A (Add Watch)<br />

2. Type the expression into the Expression text box, adjust other entries in dialog<br />

box (if necessary), <strong>and</strong> click on OK.<br />

Note: The value of the expression will appear in the Watches window during break<br />

mode.<br />

or<br />

1. In Break mode, hover the cursor over the variable to have its value displayed.<br />

Appendix B 421

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!