The name of the form to open. In the case where there are duplicate form names in the database, you can qualify the form name with the table name using this syntax: Form [email protected] Name. For example, if a database has a form called Customers for the Current_Customers and the Past_Customers tables, you can specify the form as: [email protected]_Customers, or [email protected]_Customers.
Optional. Default = "". Determines the mode of the form.
- Determines the mode of the form.
- "" (i.e. blank value) = Open the form as a standard modeless MDI window (same as if you double click on the form in the Control Panel)
- "Popup" = Open the form as a popup window.
- "Dialog"= Open the form as a modal dialog box.
- If a form is opened using the "Popup" style, the following rules apply:
- Xbasic does not pause, as it does in the case of "Dialog" style.
- The window can be moved outside of the Alpha Anywhere frame.
- Alpha Anywhere menus are not active (just like "Dialog" style).
- The window is not modal. (unlike "Dialog" style).
- The window is always on top of all other Alpha Anywhere windows.
- When Alpha Anywhere opens the form it tries to name the window the same as the form name. If a previous instance of the form is already open, then Alpha Anywhere will assign a unique name to the window by adding a digit to the end of the form name. You can explicitly assign the window name by specifying the Window name.
Optional. Default = "" (i.e. use setting defined in the Form Properties dialog). The horizontal position of the window. Possible values are:
Optional. Default = "" (i.e. use setting defined in the Form Properties dialog). The vertical position of the window. Possible values are:
Load and show a form
'Using the window name: :form.view("customers") :customers.maximize() 'Using the object reference f = :form.view("customers") f.maximize() ... do things f.close()
If you opened a form, but did not assign an object pointer at the time you opened the form, you can still get an object pointer reference to the form using the obj()command. For example:
:form.view("customer") f = obj(":customer") ... do things f.close()
To load the form into memory, without displaying it, use the FORM.LOAD() method.
When a form loads, any OnInit and onactivate scripts that are defined for the form execute. This can make debugging an application tricky. By specifying a special keyword for the Style parameter, you can load the form without having the scripts execute. For example:
frm = form.load("customer", "SCRIPT_DISABLE_EXEC") ... do things frm.close()
This script opens the Customer form and then maximizes the form and adds a new record.
:form.view("customer") :customer.maximize() :customer.new_record() :customer:last_name.value = "Smith" :customer:first_name.value = "John" :customer.commit() ... do things :customer.close()
Desktop applications only.