Some objects in
Visual Basic have a property that is considerd the most important
this property is called default property (for example to a label
control the most used property is Caption). This property can be
accessed by using only the object’s name.
Label1 = “I have used the default property”
Text1 = “This text is inserted using the default
Performing several operations with
At some point in
your code the need for performing more operations on a single
object may arise. Example:
“Welcome to MyApplication”
Form1.Left = 0
Form1.Top = 0
Form1.Width = Screen.Width
Form1.Height = Screen.Height
You can avoid
typing the object’s name over and over again by using the
With … End With statement.
| With Form1
.Caption = “Welcome
This way your code
becomes more small and easy to write.