Saturday, 12 October 2013

Print the result value in the TEXT BOX instead of MESSAGE BOX

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)






  <---- Previous page                                Next page ---->

VB.NET HOME PAGE