With statemnt is used to execute statements using a particular object. The syntax looks like this:
With
object[statements]
End With
Sample Code
The following code sets text and width for a button using the With Statement.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)_Handles MyBase.Load
With Button1
.Text = "With Statement"
.Width = 150
End With
End Sub
-

No comments:
Post a Comment