Check box & Radio button or Option button
- Option button = It can provides a set of choices from which a user can select only oe button by
- Clicking it at runtime
- Assigning the value property to true in code like option.value = true.
- Using the shortcut keys specified in the caption of a label.
- Check box Control = The check box acts as a "toogle" control: if it is on", clicking it turns it off, clickng it turn it on.Unlike the option button , the operation of each check box on a form or frame is independent of all other checkboxes.
The program can read or set the status of a checkbox with the value property . The value property of a checkbox is of integer type. A value of 0 means off , value of 1 means "on" . you can use V.B constants VB checked or VB unchecked for 0 or 1 , respectively.
Vscroll And Hscroll
- Scroll = The scroll bar is a long stripe with an indicator that lets the user select a value between the two ends of the control . The scroll bar control comes in two vertcal , horizontal . The left or bottom end of the control corresponds to its of the control is determined by the postion of the indicator which can be scrolled between the minimum and maximum value.
- Min : The control minimum value.
- Max : The control Maximum value.
- Value: The control current value specified by the indicator postion.
Coding
Dim a
Dim bDim a
Dim c
Private Sub Command1_Click()
a = VScroll1.Value
b = VScroll2.Value
c = VScroll3.Value
Text5.BackColor = RGB(a, b, c)
End Sub
Private Sub Command2_Click()
a = VScroll1.Value
b = VScroll2.Value
c = VScroll3.Value
Text5.BackColor = RGB(a, b, c)
End Sub
Private Sub VScroll1_Change()
Text4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Text1.Text = VScroll1.Value
Text3.Text = VScroll2.Value
Text2.Text = VScroll3.Value
End Sub
Private Sub VScroll2_Change()
Text4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Text1.Text = VScroll1.Value
Text3.Text = VScroll2.Value
Text2.Text = VScroll3.Value
End Sub
Private Sub VScroll3_Change()
Text4.BackColor = RGB(VScroll1.Value, VScroll2.Value, VScroll3.Value)
Text1.Text = VScroll1.Value
Text3.Text = VScroll2.Value
Text2.Text = VScroll3.Value
End Sub
File Control = The three of the control on the tool box let you can access the computer file system . They are drive list box , directory , file list box which are the basic block that displays the host computer file system using these control the user can access the host computer file system locate any folder or files on any hard disk . The file control are independent of one another.
- Drive list box = It can display the name of the drive with in and connected to the p.c . The basic proeprty of this control is the drive property, which set the drive to be initially selected in the control or return the user selection.
- Dir list box = It can display the folder of the current drive . The basics property of this conrol is path property which is the name of the folder whose sub folder are displayed in the control.
- file list box = It can display the file of the current folder . The basics property of the control is also called path and its the path name of the folder whose file are display.
0 comments:
Post a Comment