The first Visual Basic
It is easy for an application to create a Visual Basic application. How easy is that? To answer this question, try creating the following Hello, Visual Basic, and Firstapp applications.
Hello, Visual Basic
There are three main steps to creating a Visual Basic application:
1. Create the Application interface
2. Set properties
3. Write code
To illustrate this implementation process, follow these steps to create a simple application that consists of a text box and a command button. Click the command button and the "Hello, world!" message appears in the text box.
Creating the Application Interface
Forms are the basis for creating applications. You can add windows and dialog boxes to your application by using a form. You can also use forms as containers for items that are not part of the application interface. For example, you might have a form in your application that is intended to be displayed in other forms as a graphics container.
The first step in building a Visual basic application is to create a form that will be the foundation of the application interface. Then draw the object that makes up the interface on the form you created. For the current first application, you can use the two controls in the Toolbox.
Drawing controls with the toolbox
1. Click the tool for the control you want to draw-this is the text box.
2. Move the pointer over the form. The pointer changes to a cross line, as shown in Figure 2.3.
3. Place the crosshair in the upper-left corner of the control.
4. Drag the crosshair to draw a box that fits the size of the control you want (dragging means holding down the left mouse button to move the object with the mouse pointer).