Type the following code between the Sub and End Sub
statements:
Text1.Text = "Hello World!"
After you type just "Text1", Visual Basic
displays an Auto List Members drop-down list box as
shown in the following figure. VB offers this drop-down
list box so that you can select the property instead
of typing the full property name.
Figure 4.2

 |
Select the property and press the
spacebar, VB will automatically fill the property. |
The event procedure should look like this:
1: Private Sub Command1_Click ()
2:
3: Text1.Text = "Hello World!"
4: End Sub
 
The above code simply changes the Text property of
the Text Box named Text1 to read "Hello World!"
when the button is clicked.
Line 2: is a remark. A remark is a comment inside
a VB program that describes the code. Remarks start
with a single apostrophe.
|