How To : Adding a Form to a Class
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:
- Right-click on the class and select Add Form.
- 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. - Select from the following choices:
- 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.
- 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:
- Under Add a New Form Adapter, in the Form Adapter Name: text box, type the name you want to give your form adapter.
- From the Choose a Project: combo box, choose the project where you want the form adapter to be created.
- Click OK.
- 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.
- In the Property Editor, change/set any properties for the form you want.
- To open the form for editing, in the Solution Detail, double-click the form.
To delete a form from a class:
- Select the form.
- 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
[edit] Next Steps
Adding a Function to a Class
Adding a Field to a Class
[edit] Tags
Categories: HOW TO | Forms | Bungee Logic | Programming