This object is a window or dialog box that constitutes part of an application’s user interface.
Form
The Form object supports the following properties:
The Form object supports the following methods:
Cls | SetScale |
DrawCircle | ScaleX |
DrawLine | ScaleY |
Hide | SetFocus |
Move | Show |
Point | TextHeight |
PointSet | TextWidth |
Refresh | ZOrder |
The Form object supports the following events:
Activate | LostFocus |
Click | MouseDown |
DblClick | MouseMove |
Deactivate | MouseUp |
GotFocus | Paint |
KeyDown | QueryUnload |
KeyPress | Resize |
KeyUp | Terminate |
Load |
Forms have properties that determine aspects of their appearance, such as position, size, and color, and aspects of their behavior, such as whether or not they are resizable.
Forms also can respond to events initiated by a user or generated by the system. For example, you can write code in a form's Click event procedure that enables the user to change the color of a form by choosing it.
In addition to properties and events, you can use methods to manipulate forms using code. For example, the Move method changes a form's location and size.
When designing forms, set the BorderStyle property to define a form's border, and set the Caption property to put text in the title bar. In code, you can use the Hide and Show methods to make forms invisible or visible at run time.
Setting BorderStyle to 0 removes the border. If you want your form to have a border without the title bar or control menu box, delete any text from the form's Caption property and set the form's ControlBox properties to False.