![]() |
|
|
Manipulating the Different Controls and Components In this section, we'll take a closer at the many controls available in Visual Basic. Most of these are located in the Tool Box and can be easily drawn on your forms. Combo Boxes and List Boxes Frames, Option Buttons and Check Boxes Using the Timer Control Adding Additional Controls to your Tool BoxFrames, Option Buttons and Check Boxes No...It's not the kind of frames you use in web pages. In VB, frames hold the more traditional definition: Something that borders controls and groups them together. Frames can be used in conjunction with option buttons. If you were to place four option buttons below each other on your form, you wouldn't be able to make two selections, therefore, you would use two frames to create two groups. frames also help make things more visually clear for the user, by separating different controls from each other and grouping those that are similar. As a general rule, always include option buttons and check boxes inside of frames. To create a frame, you simply draw it onto your form, and to place Option Buttons or Check Boxes into the frame, you simply draw them inside the frame. That is simple enough. Here is a brief guide to using option buttons and check boxes: You are most likely to use the Value event of these controls. What this event does is that it checks whether the option button/check box is clicked or not. You may want to check when the user makes a selection and then clicks an OK or Submit button your form. Here are examples for both controls: Option1.Value = True Option1.Value = False CheckBox.Value = Checked CheckBox.Value = UnChecked |