VISUAL BASIC_6
 

Creating an Application or a Project:

 Let us now wet our hands by actually creating an application using the IDE.   Creating any VB application consists of only three steps.  

 1. Create the interface by placing the required controls in the form window.

2.  Set Properties to the controls using the Properties window of each control.

3. Write codes to manipulate the properties of the controls in the Code Window.

 You start VB by clicking the start button on the task bar.   The screen displays the programs list as shown in the figure 2.

Figure 2

Now click on the items Visual Studio and then Visual Basic 6.    You will get the opening

Screen as shown in the figure 1.

Controls used in this Project:

We use five command buttons and one text box in this project.   For drawing a control in the form window, double click on the appropriate control.   The control with default characteristics is brought into the form.   It can be dragged and resized according to your requirements.  Drag the above mentioned 6 controls from the Toolbox and position them as shown in the figure 3.  Of course you can size and position them according to your liking.

Setting the Properties of  the Controls:

 Each control has a separate Properties window.  The Properties window will be normally visible on the right side.   If it is not visible it can be opened by clicking ‘Properties Window’ from the View menu after selecting the required control.   We can initialize the properties like size, caption, color etc. by selecting the desired values using the drop-down menu for the controls as well as the properties.   The Text property of the text box is given blank.   We simply retain the names of the other controls as they are.  The form window with the five controls will be as shown in the figure 3.


 
  Figure 3


 

Copyright © 2001 Selfonline-Education. All rights reserved.