Visual Basic 4 in 12 Easy Lessons vel4p01.htm
Visual Basic 4 in 12 Easy Lessons vel4p01.htm
Step 1: Start Visual Basic
Step 2: Practice Working with Visual Basic
Step 3: Modify the Environment
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:
An introduction to programming
A brief history of the BASIC language
How programming for Windows differs greatly from programming for text-based systems, such as DOS
The kinds of programming errors that you can expect
Why program errors appear and the steps that you take to correct them
How to install the Visual Basic Working Model CD-ROM that comes with this book
How to start Visual Basic
The parts of the Visual Basic screen and environment, such as the five fundamental windows of the program
The Visual Basic menus
How to exit Visual Basic
Step 1: Start Visual Basic
Before you write a Visual Basic program, you must start the Visual Basic system. Follow these steps:
Turn on your computer and let Windows fully start.
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
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.
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.
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.
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
If you want to get rid of the toolbar toolbarthe bar of icon buttons directly below the menu barpress Alt+V, T. The toolbar disappears to give you more screen room.
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.
Press Enter or click OK to see the results. The Form window no longer has grid dots.
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.
Wyszukiwarka
Podobne podstrony:
vel4p09vel4p08vel4p02vel4p06vel4p04vel4p03vel4p07vel4p05więcej podobnych podstron