Create Application Using Visual Basic 6.0

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

First of all, launch Microsoft Visual Basic 6 compiler that you have installed earlier. In the New Project Dialog , choose StandardEXE to enter Visual Basic 6 integrated development environment. In the VB6 IDE  a default form with name Form1 will be presented . Now, double click on Form1 to bring up the source code window for Form1 as shown in the figure given bellow . The top of the source code window consists of a list of objects and their associated events or procedures. In the source code window, the object displayed is Form1 and the associated procedure is Load.
Create Application Using Visual Basic

create application in vb6.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.
.

Hits: 1

Leave a Reply

Your email address will not be published. Required fields are marked *