Visual Basic 6 Step-by-Step

Visual Basic 6 Step-by-Step thumbnail
It's easy to start programming with VB6.

Visual Basic 6 is a graphical, event-driven programming language for Windows. It is based on the BASIC language, and is designed to be quick and easy to use. This makes it ideal for beginning programmers, and an excellent language for prototyping. Creating a basic Windows program is simple with VB6.

Instructions

    • 1

      Create a new project. Select "File," "New." Select "Standard EXE" from the "New Project" dialog, which also appears by default when you start VB6.

    • 2

      Draw controls for your program. Click on a control on the toolbar at the left of the screen. Click and drag on the form (the window in the middle of the screen) to draw a control.

    • 3

      Set the properties of your controls. "Properties" are attributes that determine how a control looks and behaves. For example, a command button's "Caption" property determines the text displayed on the button. Right-click on a control and select "Properties" from the menu to display the "Properties" dialog, which allows you to set a control's properties.

    • 4

      Add code to your controls. Each control has several "events" associated with it. When one of the events occurs VB6 runs the code associated with that event. For example, a command button's "Click" event is run when the user clicks on the button. To add code to a control, double-click on it. This opens the "Code" window, which allows you to select events and add commands to them.

    • 5

      Press "F5." This runs the program within VB6 and allows you to test it. Check it carefully to make sure it is working the way you intended.

    • 6

      Debug your program. It's normal to find places where your program doesn't work the way you intended. When you do, go back and edit the program.

    • 7

      Compile your program when it's finished. Select "Make Project1.exe" from the "File" menu to display the "Make Project" dialog, which allows you to set options for the compiled program. Click "OK."

Related Searches:

References

  • Photo Credit Jupiterimages/Brand X Pictures/Getty Images

Comments

Related Ads

Featured