Creating Visual Basic Projects

Creating a new Visual Basic project is a simple task. You can either click the File, New Project command or the New Project link from the Start Page. In both cases, Visual Studio shows the New Project window, which you can see in Figure 2.5.

Figure 2.5 The New Project window for Visual Basic.

image

As you can see, the look of the New Project window is quite different from previous versions of Visual Studio. To understand what kind of Visual Basic applications you can create, you simply need to select the Visual Basic node on the left side of the window. After you click the node, you see a lot of different kinds of applications you can create with Visual Basic 2010, such as Windows applications, Web applications, Office System customizations, Silverlight applications, Windows Communication Foundation Services, and so on.

Note About Available Project Templates

The list of installed project templates can vary depending either on the Visual Studio 2010 edition or on additional items installed later (for example from the Visual Studio Gallery).

Each kind of application is represented by a specific project template, which provides a skeleton of a project for that particular kind of application, including all the references or the basic code files required. For example, the Windows Forms project template provides a skeleton of a project for creating a Windows application using the Windows Forms technology, therefore including references to the System.Windows.Forms.dll assembly, specific Imports directives, and Windows Forms objects represented by the appropriate code files. Moreover, Visual Studio will automatically enable the Windows Forms designer. Notice the detailed description for each template on the right side of the window every time you select a particular template.

Note

In the second part of this book you find in detail several kinds of applications you can build with Visual Basic 2010. For this reason a full description of each project template will be provided in the proper chapters. At the moment the description provided by Visual Studio for project templates is sufficient. Also consider that in this first part of the book the Console Application project template is used because it is the most appropriate for learning purposes.

Typically when you create a new project, Visual Studio also creates a solution containing that project. If you plan to add other projects to the solution, it can be a good idea to create a directory for the solution. This allows for a better organization of your projects, because one directory can contain the solution file and this directory can then contain subdirectories, each of them related to a specific project. To accomplish this, ensure that the Create Directory for Solution check box is selected (refer to Figure 2.5). The New Project window also offers some interesting features: the .NET Framework multitargeting, the ability of searching through templates, and the ability of managing templates. We now discuss each of these features.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.27.58