Visual Basic 4 in 12 Easy Lessons vel4p01.htm

Previous Page TOC Next Page



Project 1


Welcome to Visual Basic!




Note: This first project is slightly different from the other projects because although you have been exploring the Visual Basic environment, you have not yet written a program. Beginning with the second project, you will see how a complete Visual Basic program works.

Stop and Type: In this lesson, you learned about the history of Visual Basic and the fundamentals of its programming environment. Visual Basic is a programming system rich in tools. The five windows of the Visual Basic programming system operate in conjunction with one another to give you the tools that you need to create programs.

In this lesson, you saw the following:


Step 1: Start Visual Basic


Before you write a Visual Basic program, you must start the Visual Basic system. Follow these steps:

  1. Turn on your computer and let Windows fully start.

  2. Click your toolbar's Start button, select Programs, display the Visual Basic 4 menu, and click on the Visual Basic 4.0 Working Model option to start Visual Basic. The Visual Basic Working Model programming environment appears.


Step 2: Practice Working with Visual Basic


  1. Resize the Form window so that its lower edge reaches the bottom of your screen. Move the mouse cursor to the lower edge of the Form window until the mouse cursor becomes a two-headed arrow. Drag the lower edge downward as far as you can and release the mouse button.

  2. When you clicked the Form window's edge, the Form window probably hid the Project and Properties windows from view. Press Alt+V, R to bring the Project window into view. By pressing Alt+V, R, you select the View Project window menu command.

  3. The Toolbox window is a window that you will use nearly as often as the Form window. You might not like the location of the toolbox, however. Sometimes when you expand the Form window to the size of the entire screen, you will be placing items at the left of the Form window, where the toolbox is now. Therefore, practice moving the Toolbox window.

  4. Point the mouse cursor to the thin bar at the top of the Toolbox window. This bar to the right of the control button is known as the title bar even though there is no title on the Toolbox window's title bar. Click and hold the mouse, and drag the Toolbox window to the right side of the screen.


Step 3: Modify the Environment


  1. If you want to get rid of the toolbar— toolbar—the bar of icon buttons directly below the menu bar—press Alt+V, T. The toolbar disappears to give you more screen room.

  2. Visual Basic enables you to turn off the grid dots on the Form window. Press Alt+T, O to display the Options dialog box. Uncheck the Show grid option to turn off the grid.

  3. Press Enter or click OK to see the results. The Form window no longer has grid dots.

  4. Feel optimistic with your Visual Basic skills? Reverse the changes that you made in this section. Turn the toolbar and the grid dots back on.



Note: If you want to play more with Visual Basic's environment, go ahead. When you are finished, exit Visual Basic by pressing Alt+F, X. Visual Basic will notice that you've made changes and will display a dialog box that asks whether you want to make changes to the form. Select No to indicate that you do not want this project's changes to remain in effect and that you want to return to Windows. Always return to Windows when you're finished with Visual Basic.

Previous Page Page Top TOC Next Page