Here objectname specifies the name of an object, and Method specifies the name of a method.
Form1.Print “Hello World”
Here Form1 is form name , and method Print is called to print the String “Hello World” to form.
There are different methods associated with different controls.Methods are useful because they hide the details of how an action is performed.
The programmer just needs to call the method ,how the action is performed it is not his or her headache.
Put a dot after the name of control then various options will look like in figure.
Methods associated with some commonly used controls:
It is control that provides a list of items.
Methods of List Box:
1) Additem: This method adds the specified item to the list
2) Removeitem: This method is used to delete an item from the list.
3) SetFocus: Used to make the list box the Current active element.
A combo box has all the properties exhibited by the text box and list box.
Methods of combo box:
1.Additem: This method will add the specified item to the combo box.
2.Remove Item: This method will delete an item from the combo box.
Option button are used when the user can select one and only one of the multiple options.
Typically,there are no special methods associated with option buttons.A method associated with option
Move: Moves a control on the form.
The easiest way to allow the user to interact with an application is to provide a button to click.
Visual Basic provides this in form of Command Button.
One method is used with the command button:
Move: Moves a control on the form