Creating a New Project


When you first start Visual Studio .NET, you're shown the Start Page tab within the IDE. You can open projects created previously or create new projects from this Start page (see Figure 1.1). For this quick tour, you're going to create a new Windows application, so open the File menu and click New Project to display the New Project dialog box shown in Figure 1.2.

Figure 1.1. You can open existing projects or create new projects from the Visual Studio Start page.


Figure 1.2. The New Project dialog box enables you to create many types of .NET projects.


By the Way

If your Start page doesn't look like the one in Figure 1.1, chances are that you've changed the default settings. In Hour 2, "Navigating Visual C# 2005," I'll show you how to change them back.


The New Project dialog box is used to specify the type of Visual C# project to create. (You can create many types of projects with Visual C#, as well as with the other supported languages of the .NET Framework.) Create a new Windows application by following these steps:

1.

Make sure that the Windows Application icon is selected (if it's not, click it once to select it).

2.

At the bottom of the New Project dialog box is a Name text box. This is where, oddly enough, you specify the name of the project you're creating. Enter Picture Viewer in the Name text box.

3.

Click OK to create the project.

Did you Know?

Always set the Name text box to something meaningful before creating a project, or you'll have more work to do later if you want to move or rename the project.


When Visual C# creates a new Windows application project, it adds one form (the empty gray window) for you to begin building the interfacethe graphical windows that you interact with, for your application (see Figure 1.3).

Figure 1.3. New Windows applications start with a blank form; the fun is just beginning!


By the Way

Within Visual Studio .NET, form is the term given to the design-time view of windows that can be displayed to a user.


Your Visual Studio .NET environment might look different from that shown in the figures of this hour due to the edition of Visual Studio .NET you're using, whether you've already played with Visual Studio .NET, and other factors such as the resolution of your monitor. All the elements discussed in this hour exist in all editions of Visual Studio .NET, however. (If a window shown in a figure isn't displayed in your IDE, use the View menu to display it.)

By the Way

To create a program that can be run on another computer, you start by creating a project and then compiling the project into a component such as an executable (a program a user can run) or a DLL (a component that can be used by other programs and components). The compilation process is discussed in detail in Hour 23. The important thing to note at this time is that when you hear someone refer to creating or writing a program, just as you're creating the Picture Viewer program now, they're referring to the completion of all steps up to and including compiling the project to a distributable file.





Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net