Standard Controls: The Form
Standard Controls: The Form
Standard Controls: The Form
The Form
4/22/2012
4/22/2012
BackColor BorderStyle Caption ControlBox Enabled Font ForeColor Height Icon Left MaxButton MinButton MousePointer Moveable Picture
Specifies the form's background color. Windows control colors. Determines how the Form window appears. Displays text on the form's title bar at runtime. Determines whether the form appears with the Control menu icon. Determines whether the form is active or not. Produces a Font dialog box in which you can set the text's font name, style, and size. Holds the color of the form's text. Holds the height of the form's outline in twips. Describes the icon graphic image displayed on the taskbar when the user minimizes the form. Holds the number of twips from the form's left edge to the screen's left edge. Specifies whether a maximize window button appears on the form. Specifies whether a minimize window button appears on the form. Determines the shape of the mouse cursor when the user moves the mouse over the form. Specifies whether the user can move the form at runtime. Determines a graphic image that appears on the form's background at runtime.
Determines whether the form appears on the Windows taskbar. Determines the state (centered or default) of the form at application startup. Holds the number of twips from the form's top edge to the Form window's top edge. Determines whether the form appears or is hidden from the user. Holds the width of the form in twips.
4/22/2012
Width WindowState
Determines the initial state (minimized, maximized, or normal) in which the window appears at runtime.
Text Box
Text boxes accept user input.
4/22/2012
Alignment BackColor BorderStyle Enabled Font ForeColor Height Left Locked MaxLength MousePointe r MultiLine PasswordCh ar ScrollBars TabIndex TabStop Text ToolTipText Top Visible Width 4/22/2012
Determines whether the text box's text appears left-justified, centered, or right-justified Specifies the text box's background color. Determines whether a single-line border appears around the text box. Determines whether the text box is active or not Produces a Font dialog box in which you can set the Text property's font name, style, and size. Holds the color of the text box's text. Holds the height of the text box's outline Holds the number of twips from the text box's left edge to the Form window's left edge. Determines whether the user can edit the text inside the text box. Specifies the number of characters the user can type into the text box. Determines the shape of the mouse cursor when the user moves the mouse over the text box. Lets the text box hold multiple lines of text or sets the text box to hold only a single line of text. Determines the character that appears in the text box when the user enters a password Determines whether scrollbars appear on the edges of a multiline text box. Specifies the order of the text box in the focus order. Determines whether the text box can receive the focus. Holds the value of the text inside the text box. Holds the text that appears as a ToolTip at runtime. Holds the number of twips from the text box's top edge to the Form window's top edge. Determines whether the text box appears or is hidden from the user. Holds the width of the text box
The Label
Labels hold the primary text that appears on a form. Often, programmers use labels to place titles in forms so that users know what to type into the text box.
4/22/2012
Description
Determines whether the label's caption appears left-justified, centered, or right-justified within the label's bound Enlarges the label's size properties, Specifies the label's background color. Determines whether the background shows through the label or if the label covers up its background text Determines whether a single-line border appears around the label. Holds the text that appears on the label. Determines whether the label is active or not Produces a Font dialog box in which you can set the caption's font name, style, and size.
Holds the color of the label's text. Holds the height of the label's outline in twips. Holds the number of twips from the label's left edge to the Form window's left edge. Determines the shape of the mouse cursor when the user moves the mouse over the label. Specifies the order of the label in the focus order.
Holds the text that shows as a ToolTip at runtime. Holds the number of twips from the label's top edge to the Form window's top edge. Determines whether the label appears or is hidden from the user. Holds the width of the label in twips. Determines whether the label expands to fit whatever text appears in the caption.
4/22/2012 WordWrap
1. 2.
Locate and size the command button on the form. Change the command button's Name and Caption properties. (The Caption property holds the text that appears on the command button.) Add code to the command button's Click event procedure.
3.
4/22/2012
Property BackColor
Description Specifies the command button's background color. Choose the back color and style- 1 graphical property
Cancel Caption Default Enabled Font Height Left MousePointer Picture Style TabIndex TabStop ToolTipText Top Visible
Determines whether the command button gets a Click event if the user presses Esc. Holds the text that appears on the command button. Determines if the command button responds to an Enter keypress even if another control has the focus. Determines whether the command button is active or not Produces a Font dialog box in which you can set the caption's font name, style, and size. Holds the height of the command button in twips. Holds the number of twips from the command button's left edge to the Form window's left edge. Determines the shape of the mouse cursor when the user moves the mouse over the command button. an icon graphic image that appears on the command button as long as the Style property is set to 1-Graphical. the command button appears as a standard Windows command button (if set to 0-Standard) or a command button with a color and possible picture (if set to 1-Graphical). Specifies the order of the command button in the focus order. Determines whether the command button can receive the focus. Holds the text that appears as a tooltip at runtime. Holds the number of twips from the command button's top edge to the Form window's top edge. Visible property to True.or False
4/22/2012
Width Holds the width of the command button in twips.
Check Boxes
A check box is an option on a form that is checked when selected and unchecked when not selected.
4/22/2012 10
4/22/2012
11
If (chkbox.Value = 1) Then ' Code to handle checked conditions Else ' Code to handle unchecked conditions End If
4/22/2012
12
4/22/2012
14
4/22/2012
15
Check box can select several item at one time but, with Option buttons, he must select only one item among several items.
4/22/2012
16
4/22/2012
17
Visual Basic supports three kinds of combo boxes Here are the three kinds of combo boxes: 1.Drop-down combo box ( Style 0) --The user can enter additional items at the top of the drop-down combo box and select items from the combo box. 2.Simple combo box (style 1)--Displays items as if they were in a list box and a list that doesn't drop down 3.Drop-down list box (Style 2) --Does not let the user enter new items,
4/22/2012
18
Property
Description
BackColor
ForeColor
Height
IntegralHe ight
List
Determines whether the combo box can display partial items, such as the upper half of an item that falls toward the bottom of the combo box.
A drop-down property list box in which you can enter values into the combo box at design time. You can enter only one at a time, and most programmers prefer to initialize the combo box at runtime. Determines whether the combo box values are automatically sorted. If False (the default value), the values appear in the same order in which the program added the items to the combo box. If 0-DropDown Combo, the combo box is a drop-down combo box. If 1-Simple Combo, the combo box turns into a simple combo box that remains open to the height you use at design time. If 2-DropDown List, the combo box turns into a drop-down list box that remains closed until the user is ready to see more of the list.
Sorted
Style
4/22/2012
19
Description Specifies the list box's background color. Determines the number of columns. If 0, the list box scrolls vertically in a single column. If 1 or more, the list box items appear in the number of columns specified (one or more columns) and a horizontal scrollbar appears so you can see all the items in the list.
Indicates the height of the list box in twips. Determines whether the list box can display partial items, such as the upper half of an item that falls toward the bottom of the list box. Holds, in a drop-down property list box, values that you can enter into the list box at design time. You can enter only one at a time The state of the list box's selection rules. If 0-None (the default), the user can select only one item. If 1-Simple, the user can select more than one item by clicking with the mouse If 2-Extended, the user can select multiple items using Shift+click and Shift+arrow Ctrl+click either selects or deselects an item from the list. Determines whether the list box values are automatically sorted. If False (the default value), the values appear in the same order in which the program added the items to the list. Determines whether the list box appears in its usual list format 21
MultiSelect
Sorted
Style 4/22/2012
Method
Description
AddItem
Clear
List
A string array that holds items from within the list box.
ListCount
RemoveItem
4/22/2012
22
List Box : 1. Occupies more space but shows more than one value. 2. We can select multiple items. 3. we can use checkboxes with in the list box. Combo Box: 1. Occupies less space but shows only one value for visibility 2. Multiple select is not possible 3. can't use checkboxes within combo boxes 4. It is Combination of Textbox and List Box & it has Three Styles (i)Simple combo (ii) DropDown (iii) DropDown List
4/22/2012
23
Frame
When you want to group several controls together - name and address, for example - you use a Frame
4/22/2012
24
4/22/2012
25
Picture Box
4/22/2012
26
4/22/2012
27
4/22/2012
28
4/22/2012
29
Extension File Description .bmp .cur .dib .emf A Windows bitmap image file An animated cursor file (not available for NT programmers at this time because NT does not support animated cursors that move) An older bitmap image format An enhanced Windows metafile extension
.gif
.ico .jpg
4/22/2012
.wmf
A Windows metafile
4/22/2012
32
Timer Control
4/22/2012
33
4/22/2012
34