Help With Visual Basic
- The purpose of the form design window is to help you lay out the controls on your user input/output forms. Choose the controls you need from the control toolbox, which is accessible through "View" > "Toolbox." The toolbox holds many controls, but most programs need just a few of them.
Distinguish among the controls that look similar to choose the right control for the job. Both Label and TextBox controls hold text, but the Label control isn't used for text input by the user, while the TextBox control is.
Check boxes and option buttons let users make on/off and yes/no-type selections, but option buttons let users choose only one among several options, whereas check boxes allow users to pick several at once. For marital status, you'd use an option button: single OR married. For body weight, use an option button: 85 to 100 OR 101 to 120. If you're asking a user what times of the day she eats meals, use check boxes: 7 a.m. AND 12 p.m. AND 6 p.m. - You don't need to be a graphic designer to arrange controls in a way that makes visual sense to the user. Placing a "Submit" button in the middle of a form with the "First Name" textbox above it and "Email Address" textbox below is going to result in a lot of form submissions with missing emails. Put the button at the end or bottom of the form.
- When you're writing code, the Visual Basic IDE (integrated development environment) delivers help content relevant to what you're typing. Place the cursor over a Visual Basic keyword like Cbool and press F1 to see a help file for that function. Visual Basic gives you context-sensitive help on your code too--functions, in particular. To recall the declaration of a function you've written, type the first few letters of its name. The IDE will show a pop-up of functions it thinks you might be referring to. The IDE's Quick Info text lists the function's return type and argument list so you don't have to go to the function definition itself.