Winform

In this section:

How to:

Reference:

The Winform command controls the forms that appear on the screen. Forms are used to edit and display data. They act as a user interface, whereas a procedure controls the application logic and use of data.

Syntax: How to Use the Winform Command

The syntax of the Winform command for displaying and controlling forms is

Winform command formname [;]

where command is one of the following:

Show

Makes the specified form active. It displays the form and transfers control to it, enabling an application user to manipulate the controls (of the form), such as buttons and fields.

Show_Active

Can be used for clarity. It is functionally identical to Show.

Show_Inactive

You can use this to change the initial properties of a form, and its controls, dynamically at run time before the form displays.

Reset

Resets a form and its controls to their original properties. All selectable controls, such as list boxes, check boxes, and radio buttons, return to their default selections.

Refresh

Repopulates the data values of the form as if control had returned to the form from an event handler, but without making the form active.

Close_All

Closes all forms. The form environment remains active.

Close

Closes the chain of forms from the currently active form back up to the specified form. If you do not specify a form, the command closes only the currently active form.

The close operation does the following:

  • Passes control directly to the beginning of the chain, to the point just following the Winform Show command that called the specified form.
  • Removes closed forms from the screen.
Show_And_Exit

Displays the specified form and then immediately terminates the application. This enables you to end an application while displaying a final form that remains on the screen. Any client-level logic, such as hypertext links and JavaScript functions, will remain active, but all native Maintain Data logic, such as event handlers, will not respond because the application has terminated.

formname

Is the name of the Maintain Data form.

Reference: Commands Related to Winform

  • NEXT. Retrieves sets of data from a data source into a stack. You can then display the data in a form.
  • TYPE. Displays messages on the screen or writes them to a file.

Displaying Default Values in a Form

If a form displays a variable that has not been assigned a value, the form will display the default value. The default value of the variable is determined by its data type and whether it was defined with the MISSING attribute:

Data Type

Default value without the MISSING attribute

Default value with the MISSING attribute

Character/Alphanumeric

space

null

Numeric

zero (0)

null

Date and time

space

null

A null value displays as a period (.) by default. You can specify a different character using the SET NODATA command.