|
|
 |
 |
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
(Publisher: The Coriolis Group)
Author(s): Steven Holzner
ISBN: 1576102831
Publication Date: 08/01/98
Chapter 2 The Visual Basic Development Environment
- If you need an immediate solution to:
- Selecting IDE Colors, Fonts, And Font Sizes
- Aligning, Sizing, And Spacing Multiple Controls
- Setting A Startup Form Or Procedure
- Using Visual Basic Predefined Forms, Menus, And Projects
- Setting A Projects Version Information
- Setting An EXE Files Name And Icon
- Displaying The Debug, Edit, And Form Editor Toolbars
- Turning Bounds Checking On Or Off
- Checking For Pentium Errors
- Managing Add-Ins
- Adding ActiveX Controls And Insertable Objects To Projects
- Customizing Menus And Toolbars
- Setting Forms Initial Positions
- Enabling Or Disabling Quick Info, Auto List Members, Data Tips, And Syntax Checking
- Displaying Or Hiding IDE Windows
- Searching An Entire Project For Specific Text Or A Variables Definition
- Optimizing For Fast Code, Small Code, Or A Particular Processor
- Adding And Removing Forms, Modules, And Class Modules
- Using Bookmarks
- Using The Object Browser
In Depth
In this chapter, were going to get started with Visual Basic at the logical place to start: the Visual Basic Integrated Development Environment (IDE). The IDE is where you do your programming work in Visual Basicjust as the name says, you develop your projects in the Integrated Development Environment.
Over the years, the IDE has become more powerful, and with that power has come complexity. The IDE used to be more or less invisible to the programmer, but now that there are all kinds of project options, ActiveX controls to add, version resource data to set, and so much more, the IDE has become a worthy object of study. In this chapter, well cover IDE tasks so you dont have to dig out that information when you have more important things to do. Well start with an overview of the IDE, and then go directly to the Practical Guide for the IDE, showing how to get things done.
Overview Of The Integrated Development Environment
The Visual Basic IDE appears in Figure 2.1, and as a Visual Basic programmer, this is where youll spend most of your programming time. If youre not already familiar with the parts of the IDE, you will be in time.
Figure 2.1 The Visual Basic Integrated Development Environment.
The Visual Basic IDE has three distinct states: Design, Run, and Debug. The current state appears in Visual Basics title bar. This chapter concentrates on the Design state. Well cover the Debug state later in the book. (In the Run state, Visual Basic is in the background while your program runs.) Its the Design state thats become complex over the years, and well lay it bare in this chapter.
The IDE is composed of these parts:
- The menu bar
- The toolbar
- The Project Explorer
- The Properties window
- The Form Layout window
- The toolbox
- Form designers
- Code windows
Well take a look at all of these parts in this overview.
The Menu Bar
The menu bar presents the Visual Basic menus. Heres a list of those menus and what they do:
- FileFile handling and printing; also used to make EXE files
- EditStandard editing functions, undo, searches
- ViewDisplays or hides windows and toolbars
- ProjectSets project properties, adds/removes forms and modules, and adds/removes references and components
- FormatAligns or sizes controls
- DebugStarts/stops debugging and stepping through programs
- RunStarts a program, or compiles and starts it
- ToolsAdds procedures, starts the Menu Editor, sets IDE options
- Add-InsAdd-in manager, lists add-ins like Application Wizard and API Viewer
- WindowArranges or selects open windows
- HelpHandles Help and the About box
TIP: Note that one important job of the File menu is to create EXE files for your program. When you run a program from the Run menu, no EXE file is created; if you want to run the program outside of Visual Basic, you must create that EXE file, and you do that with the File menus Make ProjectName.exe item (where ProjectName is the name youve set for the project).
Well see a great deal more about these menus and the items they contain in the Immediate Solutions section of this chapter.
The Toolbar
The main Visual Basic toolbar appears in Figure 2.2. This toolbar contains buttons matching popular menu items, as you can see in Figure 2.2; clicking the button is the same as selecting a menu item and can save you some time.
Figure 2.2 The main Visual Basic toolbar.
Besides the main toolbar, you can also display other dockable toolbars in Visual Basic: the Debug, Edit, and Form Editor toolbars. To display one of these toolbars, just select it using the Toolbars item in the View menu; the toolbar appears free-floating at first, but you can dock it as you like in the IDE.
TIP: If youre unsure what a particular tool in the toolbar does, just rest the mouse over it. A tool tip (a small yellow window displaying text) will display the tools purpose.
|