How to work with the TextBox and CommonButton
To work with the TextBox and CommonButton
Step 1:
Add three TextBoxes and one CommonButton into the Form1:
Properties table of Controls:
Control | Properties |
TextBox | Name=Text1 |
Text=None | |
TextBox | Name=Text2 |
Text=None | |
TextBox | Name=Text3 |
Text=None | |
CommonButton | Name=Command1 |
Caption=Working |
Step 2:
Double click on the CommonButton.
This is the VB programming codes:
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
a = Text1
b = Text2
c = a + b
Text3.Text = c
End Sub
No comments:
Post a Comment