Special Edition Using Microsoft® Visual Studio for Enterprise Development

Previous chapterNext chapterContents


- 2 -
Using Visual Studio to Create Applications

by Don Benage

Avoid pitfalls when installing this large suite of software development tools and utilities. Find out where to go on Microsoft's web site for the latest service patches.
Learn about Developer Studio, the Integrated Development Environment (IDE) shared by Visual C++, Visual J++, and Visual InterDev. Discover how to use this powerful IDE used by most Visual Studio languages.
Learn how to compile and debug applications in Visual Basic's powerful and friendly IDE. Find out why some people prefer this IDE over Developer Studio, and see how they compare.
Explore the many options you have for getting additional help with this powerful developer's suite. Discover the options you have within the products, on the CD-ROM, and on the World Wide Web.

For years, Microsoft has had a goal to deliver a single Integrated Development Environment (IDE) for all its programming tools. Developers would learn how to use this environment and then write code in the language of their choice. They could even use multiple languages much more easily than if each language had its own unique IDE. Although Microsoft hasn't yet reached its ultimate goal, a huge step forward has been taken with Visual Studio.

This chapter covers some of the rudimentary tasks that you need to know to use Visual Studio. If you're an experienced developer who has already worked with a Microsoft language product, you may want to skip this chapter and proceed directly to the more advanced material in the rest of this book. If you're new to Microsoft's tool suite, this chapter will help you to get started.

Visual Studio Setup

Installing Visual Studio presents some special challenges due to the size of this large suite of tools. Most people probably won't need to install the entire suite. It would be a rare developer who had skills in using all the languages and tools that are part of Visual Studio. If you're sharing a system with several people who work at different times, however, or want to be able to experiment with the entire tool set, you may still want to install the entire product.

To install the entire system, you need more than 2GB of disk space. If you don't install all the online help files but instead run them from CD-ROM, you can save a substantial amount of space. However, the shared components alone require up to 300MB. You also should remove earlier standalone versions of any languages in the suite (for example, Visual Basic 4.0). Finally, you should allow plenty of time for the operation. Installation times vary widely depending on the speed of your computer's CD-ROM drive, hard disk(s), and internal clock; however, installation can easily take more than three hours to install everything.

Furthermore, Visual Modeler--a design and modeling tool described in Chapter 27, "System Modeling and Microsoft Visual Modeler"--isn't included on the CD-ROM set at the time of this writing and must be downloaded from Microsoft's web site. Also, a specialized tool called the Microsoft Repository (described in Chapter 28, "The Microsoft Repository") isn't included in the main installation menu that's offered by the CD-ROM's AutoPlay feature. You must manually locate and launch the individual setup program for this tool.

Finally, two service patches (SPs) for the Visual Studio product had been released as this book went to press, and undoubtedly additional SPs will be offered in the future. In general, Microsoft patches are always cumulative so that you'll require only the most recent one; you don't need to apply a series of patches in order (see the later section "Applying a Service Patch" for more information).


NOTE: The second SP was offered in two forms: a core patch with fixes required by most users (approximately 34.6MB) and a complete patch with all fixes available at the time (87.8MB). Even with a relatively high-speed link to the Internet, downloading this patch is somewhat daunting. You may choose to download or order it on CD-ROM and have it shipped to avoid the time and connect charges you might incur.

All these potential hurdles notwithstanding, after you assemble the CD-ROMs and any appropriate SPs, uninstall any old versions, and check your hard disk to verify that you have enough space, you're ready to proceed. Although the process can be time-consuming, it's not difficult if you follow the basic guidelines offered in the following sections.


NOTE: If you're installing multiple language products, you'll be asked to restart your machine after some of the individual products are installed. It's recommended that you take the time to restart your machine any time you're prompted to do so, even if you intend to install additional products. This isn't always required. If the setup program doesn't prompt you to restart, you may safely proceed with the next product without rebooting.

Installing Visual Studio

When you launch the setup program, as described shortly, you'll first be prompted with some Helpful Installation Hints. Although it generally doesn't matter in which order you install the various tools and languages, you should install the Microsoft Developer Network (MSDN) Library last, because this component checks to see which other components you've installed and adds support information for only those tools and languages it finds. To ensure that you have the support files for all the languages and tools you're using, install the MSDN Library after everything else is properly set up.

You'll also be prompted to upgrade your version of Internet Explorer (IE) to at least version 3.01. If you already have installed a later version of IE, you may safely ignore this request. Otherwise, you should install the upgrade to 3.01 from the CD-ROM or install an even more current version from the Microsoft web site before starting the installation program for other languages and tools.

To install Visual Studio, follow these steps:

1. Insert Disc 1 from the CD-ROM set into your CD-ROM drive.


NOTE: The Master Setup program is available on all CD-ROMs in the box. If you know you want to begin with a product not on Disc 1 (such as Visual C++), you can start the Master Setup program with that CD-ROM and avoid the need to swap CD-ROMs as described later in step 7. If you're installing the entire suite, it's recommended that you proceed in the order in which the CD-ROMs are numbered.
2. Depending on your computer's configuration, the setup program may launch automatically via the AutoPlay feature of Windows NT 4.0 or Windows 95. Otherwise, you can manually launch the setup program by double-clicking the Setup.exe file in the root directory.

3. A Welcome dialog box with helpful hints appears. After ensuring that you've already taken care of everything on this short list, click the Continue button.

4. You're prompted to enter your User Name, Organization Name, and CD Key. You usually can find the CD Key on a yellow sticker attached to the back of one of the CD-ROM envelopes. Enter the requested information and click Continue.

5. The Master Setup menu appears (see Figure 2.1). You can select any of the tools or languages that you want to install, but remember to install MSDN last. For this example, the Visual C++ installation is shown.

6. Click Microsoft Visual C++ on the list of products. A secondary menu containing only those items pertinent to Visual C++ appears (see Figure 2.2).

7. Click Install Visual C++ 5.0. If you have the Enterprise Edition of Visual Studio (shown in Figure 2.2), it will be indicated on the menu. A dialog box prompting you to insert the appropriate CD-ROM appears. Replace the CD-ROM in your drive with the requested CD-ROM and click OK.

FIG. 2.1
The Visual Studio Master Setup menu allows you to begin the installation process for all languages and most of the add-on utilities.

FIG. 2.2
The Visual C++ submenu contains the C++ language and additional companion products and Software Development Kits (SDKs).

8. A Welcome dialog box appears, informing you that this installation will take approximately 15 to 30 minutes and that you can always run setup again to add or remove items to your installation. Click the Next button.

9. The Microsoft License Agreement dialog box appears. You must click Yes to indicate that you agree to the terms of the license agreement, or the setup program will exit. The Installation Options dialog box then appears (see Figure 2.3).

FIG. 2.3
The Installation Options dialog box shows you the disk space requirements for the files to be installed or those to be added if you're running setup at a later time to modify your original installation.

10. Select the type of installation you want to perform: Typical, Minimum, CD-ROM, or Custom. The Typical selection is appropriate for most uses of the product. If you aren't sure, choose Custom and explore the dialog boxes detailing all the available options.

11. After you finish making and reviewing your selections, click Next. A series of progress boxes appears, along with a number of screens showing where you can find additional information on the Microsoft web site.

12. When the necessary files are copied to your hard disk, the Registry is updated, and the setup program is about to finish, a few important reminders are presented in a series of dialog boxes. The first describes how to install system symbol files to aid in debugging applications. Click OK.

13. The next dialog box describes how to register environment variables so that you can run build tools (to compile your source code) from the command prompt. Although most developers prefer to use the graphical Developer Studio environment for building applications, you may want to use the command line for a variety of special purposes (such as executing a lengthy build process automatically at a regularly scheduled time every night). This option is selected by default. Make your selection and click OK.

14. The final "reminder" dialog box describes how to enable SQL Server Debugging (see Figure 2.4). You can do this at any time. It doesn't need to be completed before you finish this installation process. Click OK.

FIG. 2.4
If you want to use Visual Studio to debug Transact-SQL statements as they're executed on your SQL Server database, follow the instructions to install the appropriate files on your SQL Server.

15. A Setup Complete dialog box appears. Click OK to return to the Master Setup menu for Visual Studio.

Repeat these steps with any remaining products or SDKs you want to install. Remember that if you're prompted to restart your machine, you should take the time to do so, and launch the Master Setup program again to continue. If you aren't prompted to reboot, you can continue with the next product immediately.

After you install all the languages, tools, and SDKs you plan to use, you're ready to apply any service patches that have been released. This important part of the installation process can save you hours of aggravation later. Although running your new tool suite may be tempting, it's a good idea to check the Microsoft web site if you haven't already done so, download any appropriate patches, and apply them at this time.

Applying a Service Patch

Microsoft provides service patches, which include a cumulative set of all bug fixes, for all products used for corporate information systems, including their operating systems.


ON THE WEB:Service patches are available at no charge (except connect time) on Microsoft's web site at http://www.microsoft.com/vstudio/sp/. The web page provides complete instructions for installing the latest patch. In general, installation requires nothing more than simply running a setup program, verifying that the default actions to be taken are acceptable, waiting for some files to be copied, and then rebooting your machine after the patch is applied.

In addition to the service patches is a wealth of troubleshooting information in Microsoft's Knowledge Base, an online database of problems and their fixes (see the later section "Where to Get More Help").

Using Developer Studio

Developer Studio is a powerful IDE that supports application development with Visual C++, Visual J++, and Visual InterDev. You also can use it to view much of the online information available to support your development efforts. The use of Developer Studio to view information is covered later in the section "Where to Get More Help," which provides a basic introduction to using the IDE for writing and debugging applications.

In this example, you'll create a blank project and workspace, open a sample application provided with Visual Studio, build the application, and use some basic debugging techniques. The language used is Visual C++. Similar features exist for other languages, although there are differences. The most powerful debugging is available with Visual C++, with reasonably good debugging features for Visual J++. There's substantially less assistance when debugging Visual InterDev at this stage in the product's development.

Loading a Sample Application

Most of the sample applications are distributed in compressed form. To prepare a sample application for use, follow these steps:

1. Launch Developer Studio if you haven't already done so. This can be done by choosing Programs, Microsoft Visual C++ 5.0, Microsoft Visual C++ 5.0 from the Start menu. (The first Visual C++ selects the program group; the second selects the Developer Studio IDE.)

2. Click the Search button on the far right of the Standard toolbar (with a pair of binoculars and a yellow question mark).


NOTE: Don't confuse the Search toolbar button with the Find in Files button. Find in Files is represented by a pair of binoculars with a yellow file folder and is nearer the middle of the toolbar.
3. The Search dialog box appears (see Figure 2.5). On the Index page, enter Generic sample and click the List Topics button.

FIG. 2.5
The Search dialog box can be used with the index of topics or by using the Query tab to formulate a query.

4. When the topics appear in the scrollable list, select Generic Sample and click the Display button. A description of the Generic sample application will appear in the InfoViewer Topic window (see Figure 2.6).

5. Click the hot link Click to open or copy the Generic project files. A Sample Application dialog box appears. Click the Copy All button.

6. A Copy dialog box appears. In the To directory text box, enter the following location (or you may modify to suit your preferences):
c:\program files\devstudio\samples\sdk\win32\generic
7. You're asked to confirm that you want to create the new sample directory. Click OK. The files are decompressed and copied to the specified directory. A dialog box informs you when the copy process is complete.

8. Click OK.

FIG. 2.6
The Generic application is a minimal Windows application with a main window, menu bar, and a Help menu with an About command that displays an About dialog box.

Using Projects and Workspaces

You're now ready to create a project and a corresponding workspace, load files into the project, change settings for your project, build the application, and do some simple debugging. To use Developer Studio for these tasks, follow these steps:

1. Choose File, New from the menu. In the New dialog box, click the Projects tab (see Figure 2.7).

FIG. 2.7
The New dialog box allows you to create new workspaces, projects, applications, and other types of files and documents.

2. Select Win32 Application from the list. In the Project Name text box, enter a name for your new project (for example, Generic).

3. Select Create New Workspace to create a workspace that you can use to save the configuration of all the various windows you may create.

4. In the Location text box, enter a path for the folder where you want to store your project and workspace files. You can also click the ellipsis (...) button to browse for an appropriate location. Click OK.

5. At the prompt to confirm the creation of a new folder, click OK. Another dialog box confirms that your project and workspace are created. Click OK.

6. To copy the sample files into your project, choose Project, Add to Project, Files from the menu. The Insert Files into Project dialog box appears.

7. From the Files of Type drop-down list, select All Files.

8. Browse for the location of the folder where you copied the sample files from the distribution CD-ROM and select all the files. Click OK.

9. You can now try to build your application immediately, but one more detail must be taken care of. By reviewing the makefile included with the project, you can see the instructions that would be sent to the compiler if you launched a build from the command line. In particular, you can see that the library file Version.lib is required for this application to run (see Figure 2.8).

FIG. 2.8
The EXTRA_LIBS option is set to Version.lib in this makefile, indicating that the library file is needed for this application to build properly.

10. To make the equivalent setting in the graphical IDE, choose Project, Settings from the menu. The Project Settings dialog box appears.

11. Click the Link tab (see Figure 2.9).

FIG. 2.9
The Project Settings dialog box allows you to make project-specific changes to the compiler and link options.

12. At the very end of the Object/Library Modules text box, insert version.lib to add this library to your project. Setting options in this dialog box when you're building applications within the IDE is the equivalent of using a makefile when you're building applications from the command line. Click OK.

13. To build the application, click the Build button (the second button from the left on the Build minibar) (see Figure 2.10). If you don't now have the Build minibar visible, right-click anywhere on the toolbar area and select it from the pop-up menu.

FIG. 2.10
The Build minibar has toolbar buttons that control the build and debug processes.

14. The results of your build process appears on the Build page of the output window at the bottom of the screen. (If the output window isn't visible, choose View, Output from the menu.)

15. Assuming that you had no (serious) errors (as should be the case if you've followed the example exactly), you can now run the application and experiment with some simple debugging techniques.

You've created a project and learned how to compile and link your application into an executable program or module. This rudimentary process is the basis for any build process you might run. But Developer Studio is used for more than just building applications. It's also a powerful debugging tool that helps you find any errors in your code and correct them.

Basic Debugging with Developer Studio

You'll now learn some rudimentary debugging capabilities offered by Developer Studio. These techniques are only the beginning. Many sophisticated techniques involve writing code specifically to aid the debug process and other skills beyond the scope of this book. This section will familiarize you with the basics and get you started. This example uses the results of the previous two procedures, which loaded and built the Generic sample application provided with Visual Studio.

To debug a Visual C++ application, follow these steps:

1. In the Workplace window at the left of the screen, double-click the Generic.C file to display its contents in the code window at the right. Scroll through the code until you find the switch statement and the IDM_ABOUT case statement just below that (see Figure 2.11).

FIG. 2.11
A breakpoint is added at the statement that displays the About dialog box for this application.

2. Select the DialogBox statement, as shown in Figure 2.11. Click the Insert/Remove Breakpoint toolbar button (with the hand icon) to toggle a breakpoint on this line.

3. To run the application, click the Go toolbar button (with a page of code with a downward arrow to the right). The Generic application runs and displays its own window (see Figure 2.12).

FIG. 2.12
The Generic application is only a shell. The only functionality that's provided is the About box and some very rudimentary behavior from menus, minimize buttons, and so forth.

4. Choose Help, About from the menu. The breakpoint should fire and the application will temporarily stop executing. Developer Studio will get focus and display the code window with the breakpoint highlighted.

5. If you haven't already turned on the Debug toolbar, do so now by right-clicking anywhere in the toolbar area and selecting it from the pop-up menu. In Figure 2.13, it's docked at the left edge of the code window.

FIG. 2.13
The Debug toolbar provides complete control over the debug process, allowing you to Step Into, Step Over, or Step Out of procedure calls.

6. Highlight a variable or expression (such as wmId) and right-click the name. Choose QuickWatch from the pop-up menu. The QuickWatch window appears, containing the current value of the variable or expression you highlighted (see Figure 2.14).


TIP: If you need only the value of a single variable, you don't even need the QuickWatch window. Simply select the variable and position the mouse pointer over the name. A tool tip will pop up over the name with the current value of the variable (see Figure 2.15).
7. Click the Step Into button on the Debug toolbar (refer to Figure 2.13). Execution continues with the next statement, which should display the About dialog box. Click OK to return to debugging at the next line of code.

8. You can continue to go line-by-line by using the Step Into button, skip ahead with the Step Over and Step Out buttons, or click the Go button to resume execution until the next breakpoint is encountered or execution is halted.

FIG. 2.14
The QuickWatch window is a fast and easy way to check the values of one or more variables or expressions.

FIG. 2.15
Using tool tips to display the value of a variable eliminates the need for watch windows if you need only one value and don't want to change anything.

You've now had a little first-hand experience in using the Developer Studio debugging environment. You may want to explore other advanced features, such as viewing the contents of memory locations, checking the contents of CPU registers, viewing a disassembly of your C++ program into machine instructions, and others. Many of these features are accessed by simply clicking a toolbar button or making a menu selection. Feel free to try these out with the Generic sample or explore the other sample applications provided with Visual Studio.

Using Visual Basic's Development Environment

As already pointed out, Visual Basic doesn't share the Developer Studio IDE with Visual C++, Visual J++, and Visual InterDev. Microsoft will address this undesirable situation sometime in the future. In the meantime, the good news is that the IDE for Visual Basic is a powerful and friendly environment in its own right and offers some nice features not found in Developer Studio. Perhaps the best features of both environments will eventually be merged into a single, ultimate environment.

Until that goal is reached, many developers will be faced with learning how to use two different environments. Although this task isn't particularly difficult, it's at least annoying. And switching back and forth between the two inevitably causes moments of irritation as you try to use a feature from one environment while in the other. Be that as it may, this section introduces you to the main features of the Visual Basic environment and helps you become comfortable with its features.

To use the Visual Basic IDE, follow these steps:

1. Launch Visual Basic by choosing Programs, Microsoft Visual Basic 5.0, Visual Basic 5.0 from the Start menu. (The first Visual Basic menu selection is the Program Group; the second is the actual IDE.)

2. The Visual Basic IDE appears (see Figure 2.16).

FIG. 2.16
The Visual Basic IDE is visible behind the New Project dialog box, which you can open at any time by choosing File, New Project from the menu.

Depending on your preferences, you might also be presented with a New Project dialog box. If you don't want this dialog box automatically displayed in the future, select the Don't Show This Dialog in the Future checkbox. The various types of projects that you can create with Visual Basic appear in the dialog box.

3. For the purposes of this example, click the Existing tab in the New Project dialog box. You can browse the contents of your hard disk to find existing Visual Basic projects that you may be interested in modifying.

4. If you've loaded the sample applications provided with Visual Basic, you should find them in the folder C:\Program Files\DevStudio\Vb\samples, provided that you didn't change any of the defaults. In this example, the WinSeek sample application is loaded from the \Misc\FileCts subfolder.


NOTE: The WinSeek sample application is a utility that searches for files based on a file specification you enter. You can use the ? and * wildcard characters in the specification. You can also use a simple tree control to select the folder in which to begin your search. Subfolders are automatically included in the search. The number of matching files is counted, and full pathnames to each are provided in a result window.
5. Find the project file named Winseek.vbp and double-click it to open the project.

6. The project's files appear in the project window in the upper right (see Figure 2.17). Click the plus sign to the left of the Forms folder to display the forms in this project. Double-click the name of a form to display it in the object window in the center of the screen.

FIG. 2.17
The Visual Basic IDE with the WinSeek sample application loaded and the primary form visible.

7. Visual Basic can have separate code modules, which are stored in files that appear in the project window. Also, it's common to have code that's directly attached to a particular form as in this example. To display the code attached to a form, right-click the form name in the Project window and choose View Code from the pop-up menu (see Figure 2.18).

8. When the code appears, you're ready to debug the application. A common technique when troubleshooting an application error is to set a breakpoint at a particular line of code so that you can stop execution and investigate the current state of things. To toggle a breakpoint on a particular line of code, select the code by clicking the line in the code window and choose Debug, Toggle Breakpoint from the menu (see Figure 2.19). Set additional breakpoints, if you want.

FIG. 2.18
Right-clicking most objects in the Visual Basic IDE displays a context-sensitive pop-up menu of appropriate actions you may want to take.

FIG. 2.19
A breakpoint is indicated by a circle in the left margin of the code window and by a different colored highlight.

9. To run the application, click the Run toolbar button, which shows a right arrow similar to the play button on most video cassette recorders (see Figure 2.20). You can also choose Debug, Run from the menu.

Depending on where you set your breakpoints, the application's main form will soon appear and the application is running.

You can use the application as you would normally, until you hit a breakpoint. At that time, the Visual Basic IDE will receive focus, and the code module now running appears with the current breakpoint highlighted (see Figure 2.20).

FIG. 2.20
The Visual Basic IDE allows you to dock toolbars on any edge of the window. (The Debug toolbar is shown at right.)

When you hit a breakpoint, you can use several techniques to investigate the current state of your running application:

FIG. 2.21
You can add a variable or property to the watch window with a simple drag-and-drop operation.

FIG. 2.22
To complete a command by using the syntax help feature, select the option you want from the menu and press Tab to continue.

When you're through investigating the current state of your application, you can continue execution in various ways. You can simply press the Run toolbar button again to continue execution until (and if) you hit another breakpoint. You can also use the Step Into, Step Over, and Step Out toolbar buttons (refer to Figure 2.20), which let you control whether to continue at the next statement within the current module, skip a module altogether, or continue execution at the first statement immediately following the current module.

Although this overview of the Visual Basic IDE is by no means exhaustive, it should provide you with a basic feel for its use and allow you to orient yourself so that you can continue exploration on your own. At any time while using the IDE, press the F1 key for help. The next section presents other sources of help.

FIG. 23
Printing a value in the Immediate window is sometimes a more expedient alternative than using the watch window.

Where to Get More Help

Each language product in Visual Studio has multiple options for getting help--some particular to the individual language and some shared across all Visual Studio products. In this section, you learn how to use various sources for additional information.

With the rapid rate of change that's now common among software development products, the tool many developers prefer to use first is Microsoft's web site. Microsoft has made a large and on-going investment in providing a wealth of background information, bug fixes, downloadable update files, and the latest news through http://www.microsoft.com.

Visual Studio's primary web page is at http://www.microsoft.com/vstudio. Go here for the latest news, pricing and upgrade information, frequently asked questions (FAQ), white papers, datasheets, evaluation guides, and ordering information.

You can download service patches from http://www.microsoft.com/vstudio/sp. Here you'll find not only the latest service patch itself, but also instructions for applying it, a list of the problems it fixes, frequently asked questions, and links to related Knowledge Base articles describing specific problem scenarios. You can download the appropriate patch directly or order a CD-ROM containing the patch because it may be quite large.

As mentioned earlier, the Microsoft Knowledge Base is a large database of known problems and their fixes. Although you can't always find your specific problem in the Knowledge Base, it's usually worth checking to ensure that the difficulty you're experiencing hasn't already been diagnosed and fixed. If you want to go directly to the Microsoft Knowledge Base, visit http://www.microsoft.com/kb/default.asp. This URL takes you to a query page where you can enter keywords related to your problem or question (see Figure 2.24).

In addition to the various online options, a wealth of information is on the Visual Studio CD-ROMs. Although this information is obviously not as up-to-date as the web site, it's available anytime and is a great source of background information and tutorial-type information that isn't subject to change frequently. During installation, you can choose to install this information directly to your hard disk or leave it on the CD-ROMs. If you have lots of hard disk space, it's clearly faster and easier to access this information directly from the hard disk. However, because of the vast amount of supporting information included in Visual Studio (more than 1GB), most people are willing to trade the moderate inconvenience of having to occasionally swap CD-ROMs for the savings in disk space.

FIG. 2.24
The Microsoft Knowledge Base is an online database of problems and their fixes, complete with a query tool and search engine.

Two primary sources of information are available on CD-ROM in the Visual Studio product. The first is the Visual Studio edition of the MSDN Library CD-ROM. Also, the entire set of Visual Basic documentation is available in the form of Books Online and can be loaded independently of other reference materials.

You can view the MSDN Library CD-ROM directly in the Developer Studio IDE through the use of the InfoViewer. This application, designed as an integral component of Developer Studio, can be used to read the entire set of Visual C++ documentation. Also, you can use the built-in query capability to search for information on any topic. It can even be used to view HTML files, graphics files, Microsoft Word documents, Excel spreadsheets, and many other types of files.

Developer Studio includes multiple windows that you can dock, float, and resize as needed. Docked windows all share the same rectangular window and are separated by panes that you can drag to resize the various openings. Floating windows and toolbars exist as independent windows, which can be tiled, cascaded, or manually adjusted to facilitate viewing.

To use the InfoViewer, follow these steps:

1. If you haven't already done so, launch the Developer Studio IDE by choosing Programs, Microsoft Visual C++ 5.0, Microsoft Visual C++ 5.0 from the Start menu. You can also launch it by choosing Programs, Visual J++, Microsoft Developer Studio from the Start menu.

2. InfoViewer is most easily used with a combination of two windows: the Workspace and InfoViewer Topic windows. Depending on how you last used Developer Studio and what's now loaded, you may need to open these two windows. To open the Workspace window, choose View, Workspace from the menu or press Alt+0. To open the InfoViewer Topic window, choose View, InfoViewer Topic from the menu or press Alt+1.

3. The Workspace window may have multiple tabs visible near the bottom of the window. If so, be certain that you've selected the InfoView page (see Figure 2.25).

FIG. 2.25
The Developer Studio IDE includes a hierarchical folder directory in the Workspace window on the left that can be used to select a topic for viewing.

4. You can now use the list of contents in the Workspace window to select topics for viewing in the InfoViewer Topic window. Double-click a topic to open it for viewing.

5. In addition to using the folders in the Workspace window for navigating, you can click highlighted hot spots in the InfoViewer Topic window to jump to a new location for additional information on that topic, much as you would with a web browser.

Although the Visual Basic documentation hasn't been incorporated yet into the Developer Studio IDE, you can use it in a similar fashion by launching the Books Online application. While not integrated into the same workspace as your software development, Books Online is a convenient, easy-to-use application that lets you read the VB documentation onscreen or to search for specific information. You can also place electronic "bookmarks" to flag an important topic, making it easy to find and review later. To use Visual Basic Books Online, follow these steps:

1. Choose Programs, Microsoft Visual Basic 5.0, Books Online from the Start menu. The Books Online splash screen appears, and then the dual pane display window appears (see Figure 2.26).

FIG. 2.26
Visual Basic Books Online uses a dual pane display window that you can resize or configure to your preferences.

2. The left pane of the display is called the Navigation window. The right pane is the Topic window. Use the View menu to select Navigation & Topic or Topic Only.

3. You have three options for the display in the Navigation window: Contents, Index, and Find. The name of the current selection appears at the top of the Navigation window just below the toolbar (or the menu bar, if the toolbar isn't visible). Use the three-button toolbar to the right of the displayed name to select a different option, if you want.

4. To find a particular topic, click the Find toolbar button.

5. Enter the keywords for which you want to search. For help on formulating your query, press the F1 key.


TIP: Entering two separate words in the Find box results in a search for one word or the other. If you want to search for a two-word combination (such as ActiveX document), enclose the phrase in quotation marks so that it will be treated as a single phrase rather than a group of individual words.
6. After you type in your text, press the Enter key. Books Online will find topics that match your request and display them in the Navigation window.

7. To select the topic you want, click its title in the Navigation window. It will appear in the Topic window.

You've learned about the primary web-based and CD-ROM-based resources available to Visual Studio users in search of additional information. These resources, combined with the information found in the rest of this book, should help make you an effective developer of applications with the latest techniques and designed to run in the sophisticated environments found in most organizations today.

From Here...

Although the goal of a single IDE for working in all languages still hasn't been attained, Microsoft has delivered a highly integrated and powerful multiple-language development tool suite with Visual Studio. This chapter touches on the highlights of its usage and should serve as a good beginning. Individual developers, however, usually have particular preferences as to how their environment should be configured. Microsoft has designed Developer Studio and the Visual Basic IDE to be highly customizable. As you work with the individual tools, you'll discover the methods and settings you find most effective and desirable. You can create the workspace most useful for you and automatically load those settings each time you use Visual Studio.

For more information on some of the topics addressed in this chapter and where to go next in your exploration of Visual Studio 97, see the following chapters:


Previous chapterNext chapterContents


© Copyright, Macmillan Computer Publishing. All rights reserved.