Chapter 1, Visual Basic 5 Interactive Course, Lesson 1
Many thanks to Waite Group Press for generously providing this excellent tutorial. If you'd like to know more about their interactive courses, excellent publications or other products they provide, you can jump to their site from here. This tutorial is only chapter 1 of their Visual Basic tutorial. WHAT'S ALL THAT STUFF ON MY SCREEN?Even if you've been programming for a while, your first look at Visual Basic 5 (VB 5) is likely to startle you. There sure is a lot of stuff there! True, and a lot of it is new to Visual Basic. In this chapter, you will learn to maneuver around the Visual Basic 5 integrated development environment and to set it up for convenient programming. You won't be writing any programs, but learning these techniques can be a big time saver for you. Even if you are upgrading from VB 3 or VB 4, you will find something new here. GETTING STARTED We all have to start sometime. If you haven't done so already, double-click on the VB 5 icon and let's take a ride. The Opening Screen The first thing you get when you double-click on the VB 5 icon is an opening dialog box that offers a confusing array of choices. The dialog box is shown in Figure 1-1.
Wow! Let's take a look at what all those icons mean. Your Mileage May Vary
Most of the applications in this book use the standard EXE option. There are three tabs on this opening screen. To open a project file from the disk, select the Existing tab. A dialog box like the one in Figure 1-2 opens.
As you can see, this is a lot like the standard Windows 95 Explorer window, and you negotiate it the same way. Later in the book, you will learn to include windows like this in your own programs. The third tab is the Recent tab. As you might expect, it contains a list of the most recent projects you have been using. Figure 1-3 shows the Recent tab.
You will find this tab handy as you work through the lessons in this book. The Development Environment Go back to the New tab and select Standard EXE. Click on Open to begin
a new project, and let's take a look at where you
There's a lot there! Let's take a closer look at the default items on the screen. Visual Basic 5 creates Windows programs. The user interface for Windows programs is a window. (Tough stuff!) Each window that your program uses is created on a form in the development environment. Think of a form as a blank window on which you will draw the part of program that the user sees. When you are writing the program that makes a form work (called the code), you use the Code window. The items on a form are called controls. All the controls that you can use in your project are in the toolbox. Microsoft supplies several controls that are not automatically included in the toolbox. You can also purchase or download other controls, called third-party controls. These extra controls add functionality to your VB programs. Later in this book, you will see how to add more controls to the toolbox. The toolbar provides quick access to things that are found in the menus. There are several specialized toolbars, too. The standard toolbar is the one you will use the most. The Project Explorer window lets you access the different parts of your project. You may have several forms and any number of classes and program modules in a single project. (Don't worry if some of this is mysterious right now. It won't be for long!) The Project Explorer gives you instant access to any part of the project at any time. Properties are attributes of your form or an object on your form. You have properties, too. You have a height property, a weight property, and a hair color property. You can set the properties of the form or a control on the form in the Properties window. The Form Layout window lets you set the position your form will take when your program begins to run. It is a visual way to set two of the form's properties, Top and Left. The Immediate window is a kind of scratchpad. You can try out some of your program's instructions there. When you are troubleshooting a program, this becomes a Debug window where you can change the values that your program is manipulating. Dockable? All the windows except the Form window have a property of their own: They are dockable. A dockable window is one that attaches itself to the nearest edge of the screen or to the nearest other dockable window. When you move a dockable window, it "snaps" to the location. A docked window is dominant. If you drag the toolbox to the top of the screen, for example, it docks there and all the other windows change size to accommodate it. Windows that have their Dockable property enabled also have another property. They are "always on top." If they are open, they are visible and not hidden behind another window. You can view the Dockable property by right-clicking your mouse inside the window. If the word Dockable is checked, it is a dockable window. You can, of course, change that property. If a window is not docked, it is a "floating" window. Whether you choose to have a window docked or not is a matter of personal
preference.
|
Quick searches: Site Search | Advanced Site Search |
|
By using this site you agree to its terms and conditions VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc. |