6 11 1 Step 1 Create the Form

Visual LANSA

6.11.1 Step 1. Create the Form

You start creating an application by creating a form. The form will become your application's window when it is running.

To create a form select Form from the New option in the File menu or the Repository tab.

The New Form dialog is displayed. Enter the name and the description for the form:

  • Name: DEMCOM01. You can create ten components named DEMCOM01 to DEMCOM10 even if you do not have Visual LANSA hardware key.
  • Description: Sample Application

In this dialog you can also specify the framework and group where you want to store the form. In this example the form is stored in the Personnel & Payroll framework and in the Demonstration Material group.

To start working on the form, click the OK button.

View the Source Code

If you now bring up the Source view, you will notice that the component definition statement for the form has been created automatically.

* **************************************************
*
*  COMPONENT:  STD_FORM                            
*
* **************************************************
FUNCTION OPTIONS(*DIRECT)
BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CLIENTHEIGHT(302) CLIENTWIDTH(484)

...

END_COM

 

A Visual LANSA application always starts with a FUNCTION statement followed by a BEGIN_COM statement defining the form.

The END_COM statement ends the component definition. It is always the last statement in a Visual LANSA application.

Note that if the standard form (STD_FORM) definition on your system has been modified, you may see other statements as well. For more information, refer to 6.10.4 Modify Default Component Behavior.

Ý 6.11 Create an Application