C#
  Home arrow C# arrow Page 3 - Testing and Debugging a Windows Forms Appl...
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 
Moblin 
JMSL Numerical Library 
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? 
C#

Testing and Debugging a Windows Forms Application
By: Murach Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2006-07-06

    Table of Contents:
  • Testing and Debugging a Windows Forms Application
  • How to get help information
  • How to run a project
  • How to test a project
  • How to debug runtime errors
  • Perspective

  • 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


    Testing and Debugging a Windows Forms Application - How to run a project


    (Page 3 of 6 )


     
    As you learned in chapter 1, you can run a project by clicking the Start Debugging button in the Standard toolbar, selecting the Start Debugging command from the Debug menu, or pressing the F5 key. This builds the project if it hasn’t been built already and causes the project’s form to be displayed, as shown in figure 3-13. When you close this form, the application ends. Then, you’re returned to Visual Studio where you can continue working on your program.

    You can also build a project without running it as described in this figure. In most cases, though, you’ll run the project so you can test and debug it.

    If build errors are detected when you run a project, the errors are displayed in the Error List window, and you can use this window to identify and correct the errors. If it isn’t already displayed, you can display this window by clicking on the Error List tab that’s usually displayed at the bottom of the window. When you do that, you should realize that the errors will still be listed in the Error List window and highlighted in the Code Editor even after you’ve corrected them. The errors aren’t cleared until you build the project again.

    The form that’s displayed when you run the Invoice Total project


    Figure 3-13.  How to run a project

    Description

    1. To run a project, click the Start Debugging button in the Standard toolbar, select the Debug->Start Debugging menu command, or press the F5 key. This causes Visual Studio to build the project and create an assembly. Then, assuming that there are no build errors, the assembly is run so the project’s form is displayed as shown above.
    2. If syntax errors are detected when a project is built, they’re listed in the Error List window and the project does not run.
    3. To locate the statement that contains the error, you can double-click on the error description in the Error List window. After you’ve corrected all the errors, run the project again to rebuild it and clear the errors.
    4. You can build a project without running it by selecting the Build->Build Solution command.
    5. When you build a project for the first time, all of the components of the project are built. After that, only the components that have changed are rebuilt. To rebuild all components whether or not they’ve changed, use the Build->Rebuild Solution command.

    More C# Articles
    More By Murach Publishing


       · This article is an excerpt from the book "Murach's C# 2005," published by Murach. We...
     

    Buy this book now. This article is excerpted from chapter three of the book Murach's C# 2005, written by Joel Murach (Murach, 2005; ISBN: 9781890774370). Check it out today at your favorite bookstore. Buy this book now.

    C# ARTICLES

    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#
    - Working with Regular Expressions in C#
    - Sending Simple E-Mail in C#
    - Building C# Comparable Objects: IComparable ...
    - Color Transformation Applications in C# GDI+...
    - Performing Color Transformation Operations i...
    - Color Transformation in C# GDI+ Programming
    - Exceptions in C#
    - Overriding versus Overloading
    - Value Types and Reference Types
    - Defining Member and Type Visibility
    - Managing Files in C#





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