Sample program:
1. Place the TEXT BOX and a BUTTON on FORM.
2. Change the button name into ADD 2 NUMBERS.
3.Then double click on button is show the code of the form.
then type the below code.
Dim var1 As Integer
Dim var2 As Integer
Dim result As Integer
var1 = 10
var2 = 15
result = var1 + var2
TextBox1.Text = result
Type the yellow marked code instead of MsgBox(result)
1. Place the TEXT BOX and a BUTTON on FORM.
2. Change the button name into ADD 2 NUMBERS.
3.Then double click on button is show the code of the form.
then type the below code.
Dim var1 As Integer
Dim var2 As Integer
Dim result As Integer
var1 = 10
var2 = 15
result = var1 + var2
TextBox1.Text = result
Type the yellow marked code instead of MsgBox(result)
VB.NET HOME PAGE
No comments:
Post a Comment