WorkSheet3 - CSE 459.24 Programming in C# In-Class...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 459.24 – Programming in C# Roger Crawfis In-Class Worksheet #3 Creating a Windows Forms application You should have Visual Studio 2008 open. 1. Create a new Project either from the shortcut on the Start page or through the file menu, 2. Select the type to be a C# Windows Forms Application. 3. In the Location textbox, enter your desired hard drive location. Note that this will be on the mounted z: drive in the CSE environment. Name the Project Lastname Fav5Web where Lastname is replaced with your name or an alias. 4. Select OK. 5. Open Solution Explorer (View->Solution Explorer or the shortcut Ctrl-Alt-L). You will see tree views for the Properties, References and Form1.cs. Expand the Form1.cs branch. It includes a Form1.Designer.cs entry. This is an additional file in your project (you can verify this using Windows Explorer to look at the files created). This file is a normal C# source code file that is generated and updated automatically by Visual Studio as you work with the Visual Designer. 6. A Form1.cs file is also created and opened automatically in the Visual Designer. Right-click (almost) anywhere in this window and select View Code. This opens the file Form1.cs in the regular source code editor format. Note that the Designer View is primarily displaying the Form1.Designer.cs file. 7. In the source code view for Form1.cs you will notice that a Class called Form1 is defined. Form1 has a base class called Form (actually it is System.Windows.Forms.Form). It also has a new keyword called partial in its definition. This indicates to the compiler that one part of the class is defined in this file (currently only the constructor). 8. Go back to the Solution Explorer and right-click on the file Form1.Designer.cs and select View Code. This opens another source code view, but this time with the source for Form1.Designer.cs. Note that it also defines a Class
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2012 for the course CSE 459.24 taught by Professor Crawfis during the Winter '11 term at Ohio State.

Page1 / 2

WorkSheet3 - CSE 459.24 Programming in C# In-Class...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online