.NET
  Home arrow .NET arrow Page 3 - Soup to Nuts Lab 1: A Tour of Visual Studi...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Soup to Nuts Lab 1: A Tour of Visual Studio.Net
By: MSDN Virtual Labs
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 27
    2006-02-09

    Table of Contents:
  • Soup to Nuts Lab 1: A Tour of Visual Studio.Net
  • Exercise 1: Create a Simple Windows Forms Application
  • Exercise 2 Using the Visual Studio .NET IDE Tools
  • Exercise 3: Write Some Code
  • Exercise 4: Basic Debugging
  • Exercise 5: Configuring the Visual Studio .NET IDE

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Soup to Nuts Lab 1: A Tour of Visual Studio.Net - Exercise 2 Using the Visual Studio .NET IDE Tools


    (Page 3 of 6 )

    Scenario

    In this exercise, you will examine the different tools the Visual Studio .NET 2003 IDE has to offer. You will learn how to use the Properties Pane to examine and adjust design-time settings for forms and controls to change their visible appearance while visually designing the form. This exercise assumes you have completed Exercise 1.

            Tasks              Detailed Steps

    1. Examine the Properties Pane and Set Properties.

        1. Click View and choose Properties Window.

          The Properties pane becomes visible on the right-hand side of the Visual Studio .NET IDE.

          Note: you may need to size the Properties Pane so that the properties are clearly visible.

        2. In the Properties pane, choose Customers System.Windows.Forms.Form from the combo box at the top.
            
        3. In the Properties pane, click the Alphabetic button 
           
              

          The properties sort alphabetically by name.

          Note: by default, the properties pane sorts properties by category.
           
        4. In the Properties pane, scroll until the Text property is visible.
        5. In the Text property row, replace the value Customers with Northwind Customers.

          In the Forms Designer, the title in the Title Bar of the form changes from Customers to Northwind Customers.

        6. In the Properties pane, scroll until BackColor is visible.
            
        7. On the BackColor row, click on the currently selected back ground color value (the default)

            
           
          A drop-down button appears in the BackColor value box. 
        8. Click the BackColor dropdown, and change the BackColor to ControlDark
        9. In the forms designer, click on the Label1 label.

          The Properties Pane now displays properties for Label1.
        10. In the Properties pane, change the Text property value from Label1 to Customer ID:
        11. In the Properties pane, scroll until the BackColor property is visible for the label Label1
        12. Change the BackColor to ControlLight
        13. Click TextBox1.
        14. Delete the Text property value.
        15. Click Button1
        16. Change the Text property for Button1 to Get Customer and in the designer, the form should now look like this: 
           

    2. Examine the Solutions Explorer.

        1. In the Solution Explorer pane, expand the References node by clicking the plus sign next to it.

          A new windows forms project will have the following references added to it by default: System, System.Data, System.Drawing, System.Windows.Forms, and System.XML.

        2. In the Solution Explorer, right-click the Northwind project node; in the context menu that pops up, choose Add | Add New Item.

        3. From the Templates, select Windows Form

        4. In the Name box replace the text Form2 with Product

        5. Click Open.

          Visual Studio adds a new form to the Northwind project named Product.xx where xx will be cs for C# or vb for Visual Basic.

        6. In the Solution Explorer, click the Northwind project node and then click the Show All Files button.
           

          After clicking Show All Files, notice there is now a bin node visible and an obj node visible as well; these are folders in the working directory for the Northwind project, but are not included in the project.

          Note: in the event there are files in the project directory that are not part of the solution, those will show up now also.

    3. Examine the Server Explorer.

        1. Click View and choose Server Explorer.

          The Server Explorer comes into view on the left-hand side of the IDE, if it wasn’t already visible. 

        2. In the Server Explorer, expand the Servers node by clicking the plus sign next to it.

        3. Expand client1.

          Notice the different tree nodes listed here that contain information about the server: Crystal Services, Event Logs, Message Queues, Performance Counters, Services, and SQL Servers

        4. Expand SQL Servers

        5. Expand CLIENT1 server node.

        6. Expand Northwind database node.

          Notice the database objects are listed for the Northwind database: Database Diagrams, Tables, Views, Stored Procedures, and Functions.

        7. Expand Tables

        8. Expand Customers

        9. Double-click Customers.

          The Customers table data is displayed in the IDE; you can change/add/delete data through this interface if your user account has permissions

          Note: the Server Explorer allows you to examine many different aspects of a given server


        10. Close the newly opened Customers table data tab.

    4. Examine the Object Browser.

        1. Click View and choose Object Browser.

          The Object Browser displays in the center pane of the IDE, showing all referenced assemblies and projects at the root level of the Objects tree view.

        2. In the Objects tree, expand the system.windows.forms assembly node.

          The Object Browser displays all namespaces within the assembly as child nodes to the assembly node.

        3. Under the system.windows.forms assembly node, expand the {} System.Windows.Forms namespace node.

          The Object Browser displays all public enumerations, classes, structures, delegates and interfaces that exist in the namespace as child nodes to the namespace node. 

        4. In the Objects tree view, scroll down and click Form.

          The Members list shows all of the public properties and methods of the Form class; in addition at the bottom of the Object Browser pane, a definition of the selected class appears and a descriptive Summary

        5. In the Members list, scroll down and click ShowDialog().

          The description at the bottom of the Object Browser changes to reflect the definition of the selected item, in this case the ShowDialog method.

          Note: the Object Browser allows you to examine and view information for any class in any namespace existing in or referenced by the project.

    5. Examine the Class View.

        1. Click View and choose Class View.

          The Class View displays on the right-hand side of the IDE.

        2. Expand the Northwind project root node.

          The namespaces in the Northwind project display as child nodes to the Northwind project root node prefixed by {} and in this case, only one: {}Northwind.

        3. Expand the {}Northwind namespace node.

          The classes currently in the {}Northwind namespace node display: Customers, Form1, and Product. 

        4. Expand the Customers node.

          Several nodes are displayed for the Customers class including Bases and Interfaces and several for the members (properties and methods) of the Customers class.

        5. In the Class View pane, double-click label1.

          The code pane comes up displaying the code for the Customers form with the definition for the declaration of label1 highlighted.

          Note: The class view allows you to examine and explore all public namespaces, classes, interfaces and enumerations in any projects in the current solution.

    6. Examine the Help Facility.

        1. In the Solution Explorer, double-click the Customers form.

          If it wasn’t visible before, the Customers form is now visible in the Forms designer.

        2. In the forms designer, click the Get Customer button and press the F1 key on the keyboard.

          The center pane of the IDE displays help for Introduction to the Windows Forms Button Control.

        3. Click Help and choose Index.

          The Help Index pane appears on the right-hand side of the IDE.

        4. In the Index pane, in the Look for box, type Button.

          The Index pane displays button selected in the topics list with many other topics listed in alphabetical order.

        5. In the Index pane, scroll down until Button class (System.Windows.Forms) is visible and click it. 

        6. Click Help and choose Index Results.

          The Index Results pane displays in the bottom part of the IDE. 

        7. In the Index Results pane, double-click the first item in the list: titled Button Members (System.Windows.Forms).

          The help for the Button Members displays in the center pane of the IDE.

    Take Microsoft software for a test drive. With MSDN Virtual Labs, you get full access to all available Microsoft products through 90-minute modules, each with its own downloadable manual. Try this lab out now.

    More .NET Articles
    More By MSDN Virtual Labs


       · We hope you found this article from MSDN Virtual Labs to be both educational and...
     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT