AL Part I MA TE RI IDE Chapter 1: Introduction to the IDE TE D Chapter 2: Menus, Toolbars, and Windows GH Chapter 3: Customization Chapter 4: Windows Form Designer RI Chapter 5: WPF Designer PY Chapter 6: Visual Basic Code Editor CO Chapter 7: Debugging
Introduction to the IDE The chapters in the first part of this book describe the Visual Studio integrated development environment (IDE). They explain the most important windows, menus, and toolbars that make up the environment, and show how to customize them to suit your needs. They explain some of the tools that provide help while you are writing Visual Basic applications and how to use the IDE to debug programs.
Part I: IDE follow. The other chapters in this part of the book provide much more detail about particular tasks such as using the IDE’s menus, customizing menus and toolbars, and using the Windows Form Designer to build forms. Different IDE Appearance Before you start reading about the IDE and viewing screen shots, it’s important to understand that the Visual Studio IDE is extremely customizable.
Chapter 1: Introduction to the IDE Visual Studio will also look different depending on which version you have installed. The free Visual Basic 2008 Express Edition product has fewer tools than other editions such as the high-end Visual Studio 2008 Team Suite. The figures in this book were captured while using Visual Studio 2008 Team Suite, so, if you have another version, you may not see all of the tools shown here. You can learn about Visual Studio’s free Express editions at msdn2.microsoft.
Part I: IDE Figure 1-1: Use the Tools menu’s Import and Export Settings command to change the Visual Studio configuration. Projects and Solutions Before you can understand how to use the IDE effectively to manage Visual Basic projects and solutions, you should know what projects and solutions are. A project is a group of files that produces some specific output.
Chapter 1: Introduction to the IDE A solution is a group of one or more projects that should be managed together. For example, suppose that you are building a server application that provides access to your order database. You are also building a client program that each of your sales representatives will use to query the server application. Because these two projects are closely related, it might make sense to manage them in a single solution.
Part I: IDE Figure 1-2: By default, Visual Studio displays the Start Page. Visual Studio downloads the news section from an RSS feed. To change the URL Visual Studio uses, open the Tools menu, select Options, open the Environment folder, and select the Startup item. Enter the new URL in the “Start Page news channel” text box. Instead of the Start Page, Visual Studio can take one of several other actions when it starts. To change Visual Studio’s startup action, select the Options command in the Tools menu.
Chapter 1: Introduction to the IDE ❑ Show New Project Dialog Box ❑ Show empty environment ❑ Show Start Page Creating a Project After you open Visual Studio, you can use the Start Page’s Create Project link or the File menu’s New Project command to open the New Project dialog shown in Figure 1-3. Use the Project Types tree view on the left to select the project category that you want. Then select a specific project type on the right.
Part I: IDE Figure 1-4: Initially the IDE looks more or less like this. The key pieces of the IDE are labeled with numbers in Figure 1-4. The following list briefly describes each of these pieces: 10 1. Menus — The menus contain standard Visual Studio commands. These generally manipulate the current solution and the modules it contains, although you can customize the menus as needed. Visual Studio changes the menus and their contents depending on the object you currently have selected.
Chapter 1: Introduction to the IDE Windows Forms application so the Toolbox contains tools appropriate for a Form Designer. These include Windows Forms controls and components, plus tools in the other Toolbox tabs: Crystal Reports, Data, and Components (plus the General tab is scrolled off the bottom of the Toolbox). You can add other customized tabs to the Toolbox to hold your favorite controls and components. Other project types may display other tools.
Part I: IDE Saving a Project Later chapters explain in depth how to add controls to a form and how to write code to interact with the form. For now, suppose you have built a project complete with controls and code. If you try to close Visual Studio or start a new project, the dialog shown in Figure 1-5 appears. Click Save to make the Save Project dialog shown in Figure 1-6 appear. Click Discard to throw away the existing project and start a new one. Click Cancel to continue editing the current project.
Chapter 1: Introduction to the IDE Developer. When you save a project, the “Developer” part of the location would be replaced with your user name. Be sure to pick a good location before you click Save. The next time you build a project, the default will be the location you specify now so you won’t need to be quite as careful in the future, assuming you want to build a lot of projects inside the same directory.