Hi there in this article I would like to share with you a sample program that will ask you to give a number and then it will compute the square value of the given number the code is very simple and easy to understand. I hope it will help you understand how to use visual basic 6.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
Private Sub Command1_Click()
Dim a As Integer
a = Val(Text1.Text)
square = a * a
Label2.Caption = "The square value of " & a & _
" is " & square & "."
End Sub
Private Sub Command2_Click()
Label2.Caption = ""
Text1.Text = ""
Text1.SetFocus
End Sub