![]() |
|
||||||
Option Buttons... FormatsOption Buttons - Group of controls where only one can be selected at a time. Check Boxes - Group of controls where more than one can be selected at a time. Frame - Control that often acts as a container for a group of option buttons or check boxes. Image - Type of control that is used to hold a graphic. Shape - Type of control used to place rectangles, squares, ovals and circles on a form. OPTION BUTTONS:The VALUE property of the option button is set TRUE if you want it to be selected, otherwise, FALSE. Set the option buttons CAPTION property to the text you want to appear next to the option button. When assigning an option button, a variable name always starts out with the prefix, opt. If you want an event to occur when you click on an option button, you can double-click on the option button from your form to enter in the code you want executed. CHECK BOXES:More than one check box can be selected at a time. The VALUE property of the option button is set to CHECKED if you want it to be selected, otherwise, set it to UNCHECKED. A second option is to set the VALUE property on check boxes to a 0, 1 or 2.
Set the CAPTION property to the text you would like to appear next to the check box When assigning a variable name, always start out with prefix chk If you want an event to occur when you click on a check box, double-click the button to place code behind. IMAGES:Click on the images PICTURE property and locate the folder or drive where the picture is located.
All controls that are images should begin with an img prefix. SHAPES:The types of shapes and codes are shown below...
All controls that are shapes should begin with the shp prefix. LINESUse the crosshair pointer to drag a line across the screen. You may rotate the line in any direction and stretch it until releasing the move button.
Determining Focus Focus - Refers to the currently selected control on the form. This can be indicated by an | - Beam, selected text, highlighted caption or dotted border. The control with focus is ready to receive input. SetFocus - A built-in function that when executed will move the cursor to the control and give that control focus. SetFocus can be used with text boxes, command buttons, option buttons and check boxes. Examples of setFocus: Working With StringsConcatenation - Refers to combining two or more smaller strings into a larger string. In VB, you can either use the & or + symbols to concatenate. Examples of Concatenation: FormatsCENTERING A FORM IN THE MIDDLE OF THE SCREEN: (This code would go in the FORM LOAD (double click any empty space on the form.)) < Name of form > .Top = (Screen.Height - < Name of form > .Height)/2 < Name of Form > .Left = (Screen.Width - < Name of form > .Width)/2 < Name of Form > - This is the actual name of the form as you have saved it in your program. If you named your form, "myForm" then you would code the statement in the following way:
No Comments for this page. |
|
||||||||||||||||||||||||||||||||