The various components of Visual Basic(VB) are :->
1. Intrinsic Controls :->
Such as the command button and frame controls. These controls are contained inside the visual basic.exe file. Intrinsic controls are always included in the tool box.
2. Active-x controls :->
Which exists as a separate files with a .ocx firle name extension. These includes controls that are available in all editions of visual basic ( such as Datacombo, Datlalist controls and so on). And those that are available only in professional and enterprise editions (such as Listview, Toolbar Animation and Tabbed Dialog).
Many third-party Active-X controls are also available.
3. Inseriable Objects :->
Such as Microsoft excel worksheet object or a Microsoft Project calendar object can be considered controls. Some of these objects also supports OLE automation, which allows us to program from another applications objects from within a visual basic(VB) application.
# Each control has Properties Methods and Events.
=> Properties :-> Properties are what belong to the control, its data, its characteristics example changing font or fore color, the result is seen immediately.
Some properties can assigned at design time. Others can only be assigned at run-time i.e by coding.
=> Methods :-> Methods are what the control can do. Example List1.Addition "This is the test line of text."
=> Events :-> Events are provided as available hooks for use. Example If we want to check the data entered at a text box as soon as user finishes with it. In that case we use the lostFocus event
sub TxAge = LostFocus() /* where TextAge is the name of the textbox */
If val( textAge_text) > 100 then
MsgBox" warning : This person appears too old."
End if.
End sub.
# Some Examples of Controls :->
1.) The CheckBox Control :->
It displays a check mark when if is selected. It is commonly used to present yes/no or True/False selection to the user. We can use checkbox controls in groups to display multiple choices from which the user can select one or more.
The check box control used to indicate a selection, any number of check boxes may be selected
2.) A Combo Box control :->
Combines the features of a text box and a list box. This control allows the user to select an item either by typing text into to the combo box; or by selecting it from list.
Combo box presents a list of choices to the user.
3.) The Command button control :->
When this control is clicked, it invokes a command that has been written into its click event procedure to perform actions. When the user chooses the button, it not only carries out the appropriate action but it also looks as if its being in and released and is therefore sometimes referred to as a push button.
4.) Text box control :->
This control is used to get input from the user or to display text.
5.) The Progress bar control :-> It is used to pictorially represent the progress of a lengthy computer operation say file copying or doing complex computations etc. an advancing rectangular bar usually denote the progress.
Some properties can assigned at design time. Others can only be assigned at run-time i.e by coding.
=> Methods :-> Methods are what the control can do. Example List1.Addition "This is the test line of text."
=> Events :-> Events are provided as available hooks for use. Example If we want to check the data entered at a text box as soon as user finishes with it. In that case we use the lostFocus event
sub TxAge = LostFocus() /* where TextAge is the name of the textbox */
If val( textAge_text) > 100 then
MsgBox" warning : This person appears too old."
End if.
End sub.
# Some Examples of Controls :->
1.) The CheckBox Control :->
It displays a check mark when if is selected. It is commonly used to present yes/no or True/False selection to the user. We can use checkbox controls in groups to display multiple choices from which the user can select one or more.
The check box control used to indicate a selection, any number of check boxes may be selected
2.) A Combo Box control :->
Combines the features of a text box and a list box. This control allows the user to select an item either by typing text into to the combo box; or by selecting it from list.
Combo box presents a list of choices to the user.
3.) The Command button control :->
When this control is clicked, it invokes a command that has been written into its click event procedure to perform actions. When the user chooses the button, it not only carries out the appropriate action but it also looks as if its being in and released and is therefore sometimes referred to as a push button.
4.) Text box control :->
This control is used to get input from the user or to display text.
5.) The Progress bar control :-> It is used to pictorially represent the progress of a lengthy computer operation say file copying or doing complex computations etc. an advancing rectangular bar usually denote the progress.
Post a Comment