A form is the main component, which contains all the other form designer components. The Form class is used to create standard windows, tool windows, unframed and scrollable windows. The Form class is also used to create modal windows, for example a dialog window. To define form parameters the properties and the methods implemented in the IFormControl. Active form parameters from the Fore language can be obtained by using the Active property, or by using the Self reserved identifier. Self returns the parameters of the form, in the boundaries of which it has been called.
The special type of applications is a multiwindow interface application (MDI). A MDI application is the main MDI form. The main form area shows child MDI forms as separate windows.
To create main MDI form the WindowStyle property needs to have the MDIFrame value set. Child MDI forms are created by setting in the WindowStyle property the MDIChild value.
Only following components can be used on the main MDI form: BannerBar, ControlBar, MainMenu, ReportFormulaBar, Ribbon, Toolbar. Child MDI forms can contain any components.
When an MDI application is used, all child MDI forms are displayed in a special area within the main MDI form. The upper part of this area shows tabs for all opened child MDI forms. The tabs have a context menu implemented which is used to manage opened child MDI forms. This menu includes three items:
Close window.
Close all windows but this.
Close all windows.
To activate the MDI form, either click the corresponding tab or select the form from the list that opens on clicking the button. This button is located in the right part of the tab area. To close a child MDI form, click the appropriate tab using the middle mouse button (mouse wheel). To close an active child MDI form:
Select the Close Window context menu item in the tab area.
Click the button at the right side of the tab area.
In the Fore language the child MDI-windows managing is performed by the corresponding properties and methods, implemented in the IFormControl interface. On create a child MDI windows in the CreateForm method the main MDI form must be transmitted as a parental window.
NOTE. A form, which is opened modally for its child MDI form, will exist independently of this form. When a child MDI form is closed, the forms, open for it modally, will be available. All the modal forms will be closed, when the main (MDIFrame) MDI form is closed.
| Property name | Brief description | |
Active |
The Active property returns the parameters of the form, which is active at the moment. | |
MakeShortcut |
The MakeShortcut property returns a value corresponding to a hotkey combination which needs to be assigned to some action. |
| Method name | Brief description | |
CreateForm |
The CreateForm method creates a new form. |
| Event name | Brief description | |
OnActivate |
The OnActivate event occurs when a form or one of its child components gets focus. | |
OnBeginDrag |
The OnBeginDrag event occurs for a component, when a user starts to drag an object from the component. | |
OnClick |
The OnClick event occurs, if a user clicks and releases the mouse button, when the mouse cursor is over the component. | |
OnClose |
The OnClose event occurs just before a form is closed. | |
OnCloseQuery |
The OnCloseQuery event occurs when form gets command to be closed. | |
OnCommand |
The OnCommand event occurs when a command to this form is sent from another form. | |
OnCreate |
The OnCreate event occurs at the moment a form is created. | |
OnDblClick |
The OnDbClick event occurs, if a user double-clicks on the component. | |
OnDeactivate |
The OnDeactivate event occurs when a form or one of its child components loses focus. | |
OnDragDrop |
The OnDragDrop event occurs for a component if a user drops a dragged object over it. | |
OnDragEnter |
The OnDragEnter event occurs when a dragged object crosses the borders of this component. | |
OnDragLeave |
The OnDragLeave event occurs when a dragged object leaves the borders of this component. | |
OnDragOver |
The OnDragOver event occurs for this component when a user drags a dragged object over it. | |
OnEnter |
The OnEnter event occurs when a component receives focus. | |
OnExit |
The OnExit event occurs when a component loses focus. | |
OnHelp |
The OnHelp event occurs if a user clicks on a component in active help displaying mode, or the «F1» key is pressed for the active component. | |
OnHide |
The OnHide event occurs just before a form becomes hidden. | |
OnMDIActivate |
The OnMDIActivate event occurs when an active child MDI form is changed. | |
OnKeyDown |
The OnKeyDown event occurs if a component is focused and a keyboard key is pressed. | |
OnKeyPress |
The OnKeyPress event occurs if a component is focused when a user presses a character key. | |
OnKeyPreview |
The OnKeyPreview event occurs prior to each event requiring clicking. | |
OnKeyUp |
The OnKeyUp event occurs if a component is focused and a user releases any button previously pressed. | |
OnMouseDown |
The OnMouseDown event occurs, if the cursor is in component's area and a mouse button is pressed. | |
OnMouseEnter |
The OnMouseEnter occurs when the mouse cursor enters the component's area. | |
OnMouseHover |
The OnMouseHover event occurs when the mouse cursor lingers in component area. | |
OnMouseLeave |
The OnMouseLeave event occurs when the mouse cursor leaves the component area. | |
OnMouseMove |
The OnMouseMove event occurs when the mouse cursor is moved over the component. | |
OnMouseUp |
The OnMouseUp event occurs if user releases mouse button when the cursor is in the component area. | |
OnMouseWheel |
The OnMouseWheel event occurs if a component is focused when a user rotates mouse wheel. | |
OnResize |
The OnResize event occurs after a form is resized. | |
OnShow |
The OnShow event occurs just before a form is displayed. |
See also: