Visual Basic.NET
  Home arrow Visual Basic.NET arrow How to Design a Windows Forms Application
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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? 
VISUAL BASIC.NET

How to Design a Windows Forms Application
By: Murach Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-07-06

    Table of Contents:
  • How to Design a Windows Forms Application
  • How to create a new project
  • How to design a form
  • How to add controls to a form
  • How to set properties

  • 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


    How to Design a Windows Forms Application


    (Page 1 of 5 )

    Building Windows applications is not difficult with the help of Visual Studio. In this article, the first part of a two-part series, you'll learn how to plan the interface for a Windows Forms application. This article is excerpted from chapter two of Murach's Visual Basic 2008, written by Anne Boehm (Murach, 2008; ISBN: 1890774456).

    In the last chapter, you learned the basic skills for working with Visual Studio, you toured a Windows Forms application, and you tested an application with three Windows forms. Now, in this chapter, you’ll learn how to use Visual Studio to design the user interface for a Windows Forms application.

    How to set options and create a new project

    Before you start your first Windows Forms application with Visual Studio 2008, you probably should change a few of the Visual Studio options. You may also want to change the import and export settings.

    How to set the Visual Studio options

    To set the options for Visual Studio, you use the Options dialog box shown in figure 2-1. Once this dialog box is open, you can expand the Projects and Solutions group by clicking on the plus sign to the left of that group, and you can click on the General group to display the options shown in this figure.

    You can set the default project location by typing a path directly into the text box, or you can click the button to the right of the text box to display a dialog box that lets you navigate to the folder you want to use. This will set the default location for new projects, but you can always override the default when you create a new project.

    By default, most of the options are set the way you want. However, if you want Visual Studio to work the way it’s described in this book, you should check the Always Show Solution and the Save New Projects When Created options. Beyond that, it’s worth taking a few minutes to review the other options that are available. Then, you can change them if Visual Studio isn’t working the way you want it to. For instance, you may want to use the Startup group within the Environment group to stop the display of the Start Page.

    How to change the import and export settings

    The first time you start Visual Studio 2008, you’re asked what Default Environment Settings you want to use. You can choose from five options including Visual Basic, Visual C#, and Web. Among other things, your choice affects what items are available from some menus and what buttons are available from the Standard toolbar. If, for example, you choose the Visual Basic settings, you open a project with the File->Open Project command. But if you choose the Visual C# settings, you open a project with the File->Open-> Project/Solution command.

    To change these settings, you use the Import and Export Settings Wizard as described in this figure. In the first step of the wizard, choose the Reset All Settings option. In the second step, choose the Yes, Save My Current Settings option. And in the last step, if you want your menus to work as described in this book, choose the Visual Basic Development Settings option. Later, if you switch to C# or web development, you can change the settings again.

    The Options dialog box for setting the project options

     

    How to use the Options dialog box

    1. To display the Options dialog box, select the Tools->Options command. To show all of the option settings, check the Show All Settings box.
    2. To expand and collapse a group of options, you can use the plus (+) and minus (-) signs to the left of each group. To display the options for a group, click on the group. 
       
    3. To set the default location for all projects that you start from Visual Studio, you can change the Visual Studio Projects Location as shown above. 
       
    4. If you want Visual Studio to work the way this book describes it, check the Always Show Solution box and the Save New Projects When Created box. 
       
    5. Although most of the options should be set the way you want them, you may want to familiarize yourself with the options in each category so you know what’s available.

    How to set the Import and Export Settings

    1. The first time you start Visual Studio 2008, you are asked to choose the default environment settings. These settings affect how the menus work and what buttons are displayed on the Standard toolbar.
    2. To change the settings to the ones used for this book, use the Tools->Import and Export Settings command to start the Settings Wizard. Then, choose the Reset All Settings option, the Save My Current Settings option, and the Visual Basic Development Settings option as you step through the wizard.

    Express Edition differences

    • With the Express Edition, there is no third step to the Import and Export Settings Wizard because this wizard assumes that you want to use the Visual Basic development settings.

    Figure 2-1.  How to set the Visual Studio options

    More Visual Basic.NET Articles
    More By Murach Publishing


     

    Buy this book now. This article is excerpted from chapter two of Murach's Visual Basic 2008, written by Anne Boehm (Murach, 2008; ISBN: 1890774456). Check it out today at your favorite bookstore. Buy this book now.

    VISUAL BASIC.NET ARTICLES

    - Clocks and Countdowns
    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek