Hot-Link Menu in Right-Side Column

Last Updated 6-30-2010


 
MoreAddOns.php
  • More Computers
  •  
    MoreplayStation3.php
  • More Games
  •  
    Morevideo.php
  • More Electronics
  •  
    MoreComputerNetworkingBooks.php
  • More Books
  •  
    MoreOperatingSystems.php
  • More Software
  • Multiform Project Example - Part II

    When you are finished placing your controls on MainForm the result could look something like the diagram below:

    Main Form Design View

    Figure MFP-5: Visual Basic Mulitform Project Main Form Design View


    Buy from Centurion


    The next step in this multiform project example is to add the second form to our project. The following steps detail how to perform the necessary tasks:

    Adding a Form to a VB.NET Project

    To add a second form to your project. Select Project ==> Add Windows Form... from the Visual Studio File Menu as indicated in the diagram below:

    alt='New Form'>

    Figure MFP-6: Visual Basic Select a new project Form


    Help Support this site - Click this ad

    Selecting the Add Windows Form option will bring up the following dialog window:

    Add New Item

    Figure MFP-7: Visual Basic Add New Form


    Help Support this site - Click this ad

    The following 5 steps are required to add a Form to your project:

    1. Add New Item.
    2. Select Windows Forms Category: This is found under the heading Categories.
    3. Select Windows Form: This is one of the Visual Studio Installed Template Options.
    4. Give the Form a Name: This would be any name that you (the programemer) find descriptive.
    5. Select Add Button: This will put the form with the selected characteristics into your project.

    Change the Form properties as indicated in the diagram below:

    Form 2 Properties

    Figure MFP-8: Visual Basic frmChangeName New Properties


    Help Support this site - Click this ad

      The properties requiring changes on the newly added Form are:

    1. (Name): frmChangeName
    2. Text: Change Name

    Add the following controls to frmChangeName as indicated in the diagram below:

    frmChangeName Controls

    Figure MFP-9: Visual Basic frmChangeName Controls added from ToolBox


    Help Support this site - Click this ad

    Change the properties of the controls as indicated below:

    1. Button:
      • (Name): btnAccept
      • Text: Accept New Name
    2. Label:
      • Text: Your dog's new name is:
    3. TextBox:
      • (Name): txtNewName

    After changing the appropriate properties and arranging the controls on the form, it may look similar to:

    Form 2 Design View

    Figure MFP-10: Visual Basic frmChangeName Design View


    In order to continue with this guide, and follow the final discussion on multiform projects... Press the Button below:

    Help Support this site - Click this ad

    Home


    Visual Basic

    Introduction to VB.NET

    .NET Framework

    VS2008 IDE

    How VB is Compiled

    Start Visual Studio


    Windows Form App


    Save Your Work

    VB OOP Programming

    Visual Basic Code


    Exit Code


    Button Event Code

    Coding Recommendations

    If/Then/Else

    Error List Window

    Comment Syntax

    Help Window

    Language Essentianl

    Built-In Data Types


    Declare Variables

    Declare Constants

    Code Arithmetic Expressions

    Assignment Statements

    Operator Precedence

    Type Casting


    Math Class

    String Declaration

    Conversion Functions

    Conversion Methods

    Formatting Functions

    String Formatting


    Variable Scope

    Enumerations

    Nullable Types


    Loop Constructs

    For Next Loop

    Do While Loop


    Do Until Loop

    Do...Loop-While

    Do...Loop-Until


    Exit Do | Exit For

    Do...Loop


    Nested Loops


    Arrays

    Array Declaration


    Rnd( ) Function

    Listbox Control


    KeyPressEventArgs


    Parallel Arrays

    Key Event Args


    Dynamic Arrays

    Redimension Array

    Set Breakpoint

    Start Debugger


    ReDim Preserve


    MultiDimensional Arrays

    DataGridView Control


    Length and Sort Methods


    Structures

    Pad Right

    Split Method

    IsNumeric Function


    Multiform Projects


    Add Form To Project

    Form Object Methods

    Form Show Method

    ShowDialog Method

    Form Close Method

    Form Accept Button

    Multiform Project Example


    ASP.NET Web Programming

    Create Data Source


    Configure Access Data Source


    Add Product Class


    Extract Local Database Data

    Order PageLoad VB Code

    Add New Web Page


    Set Start Page

    Display Cart Aspx Code

    Display Cart Design View

    Sorted List Definition

    VB.NET Session State


    Create CartItem Class

    GetCartContents Function


    Add To Cart Event Handler

    Remove Cart Item Event


    Clear Cart Event Handler