How To : Adding a Form to a Class

Jump to: navigation, search

Back to Concepts and HOW TOs

Contents

[edit] Description

This document describes how to use the Add Form wizard to add a form to your class and a form adapter to your project.

[edit] Prerequisites

Class
Adding a Class to a Project
Understanding Forms
Understanding Form Adapters

[edit] Procedure

To add a form to a class:

  1. Right-click on the class and select Add Form.
  2. In the Add Form dialog that appears: in the Form Name: text box, type the name you want to give your form.

    Note If you do not modify the Form Name:, the form is given the name of the adapter you choose or create below. The second option has the advantage of making it easier to remember both the name of the form and the adapter acting as an interface to the form.

    Form names must be unique in their class. Adapter names must be unique within the scope of a project.

  3. Select from the following choices:
    1. Choose an Existing Form Adapter—enables you to specify a form adapter from the tab bearing the name of your solution, the tab labeled Runtime.FormAdapter, or from the tab labeled Dependencies. Your solution tab contains a list of those adapters you created. Form adapters appearing in the Runtime.FormAdapter tab are default form adapters provided by the system, and adapters listed in the Dependencies tab are those belonging to projects you have added as dependencies to your current solution. If you have yet to add a form adapter within the scope of your solution, the first tab is empty. Likewise, if you have not added any projects to your solution as dependencies, the Dependencies tab is empty.
    2. Add a New Form Adapter—enables you to create a new form adapter within the context of whatever project in your solution seems most appropriate. To do so:
      1. Under Add a New Form Adapter, in the Form Adapter Name: text box, type the name you want to give your form adapter.
      2. From the Choose a Project: combo box, choose the project where you want the form adapter to be created. 
  4. Click OK.
  5. The form appears in the Solution Detail and is automatically selected. If you also created a new form adapter in the same project with your new form, the form adapter is also visible in the Solution Explorer.
  6. In the Property Editor, change/set any properties for the form you want.
  7. To open the form for editing, in the Solution Detail, double-click the form.

To delete a form from a class:

  1. Select the form.
  2. Click the Delete icon (red X) at the top of the Solution Detail (or Right Click on the form and select Delete).

[edit] Error Handling

 

[edit] Examples

Hello Bungee Connect.

[edit] Next Steps

Adding a Function to a Class
Adding a Field to a Class

[edit] Tags


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.