Create Application Using Visual Basic 6.0
In this lesson we will Create Application Using Visual Basic 6.0 . In this we have only explain how to create application in visual basic 6.0
You do not have to worry about the beginning and the end statements (i.e. Private Sub Form_Load…….End Sub .) Just key in the lines in between the above two statements exactly as are shown here. When we press › to run the program nothing showed up .In order to display the output of the program, We have to add the Form1.show statement like in this example.
Private Sub Form_Load ( )
Form1.show
Print “Welcome to Visual Basic tutorial”
End Sub
. The command
Print
Command means displaying the output on the computer screen. Now, press › or click on the run button to run the program and you will get the output as shown as.
We can also perform
arithmetic calculations
on form by using vb6. VB uses
*
to denote the multiplication operator and
/
to denote the division operator. Example of Arithmetic operation.
Private Sub Form_Activate ( )
Print 20 + 10
Print 20 – 10
Print 20 * 10
Print 20 / 10
End Sub
Output
When we run these codes
on the output will be like
that.This output can be taken in text boxes on labels on command button and so on that we will learn in later lessons.
We can also use the + or the & operator to join two or more texts (string) together like in the following examples.
Private Sub private()
A = “Tom”
B = “likes”
C = “to”
D = “eat”
E = “burger”
Print A + B + C + D + E
End Sub
In this example A,B,C,D and E are variables and in print statement we are joining all these variables with +. When we press run button the output will be like that Create Application Using Visual Basic.
.