function NewForm( AParent: PControl; const Caption: KOLString ): PControl;
Creates form window object and returns pointer to it. If You use only one form, and You are not going to do applet button on task bar invisible, it is not necessary to create also special applet button window - just pass your (main) form object to Run procedure. In that case, it is a good idea to assign pointer to your main form object to Applet variable immediately following creating it - because some objects (e.g. TTimer) want to have Applet assigned to something.
Following methods, properties and events are useful to work with forms (ones common for all visual objects, such as Left, Top, Width, Height, etc. are not listed here - look TControl for it):
property OnMessage: TOnMessage; |
|
---|---|
property OnClose: TOnEventAccept; |
|
property OnQueryEndSession: TOnEventAccept; |
|
property OnMinimize: TOnEvent; |
|
property OnMaximize: TOnEvent; |
|
property OnRestore: TOnEvent; |
|
property OnFormClick: TOnEvent; |
|
function ParentForm: PControl; |
|
function FormParentForm: PControl; |
|
function CreateWindow: Boolean; virtual; |
|
procedure Close; |
|
procedure IconLoad( Inst: Integer; ResName: PKOLChar ); |
|
procedure IconLoadCursor( Inst: Integer; ResName: PKOLChar ); |
|
procedure Show; |
|
function ShowModal: Integer; |
|
procedure Hide; |
|
procedure MinimizeNormalAnimated; |
|
procedure RestoreNormalMaximized; |
|
function IsMainWindow: Boolean; |
|
procedure GotoControl( Key: DWORD ); |
|
procedure RemoveStatus; |
|
function StatusPanelCount: Integer; |
|
function CenterOnCurrentScreen: PControl; |
|
property Icon: HIcon; |
|
property Caption: KOLString; |
|
property ModalResult: Integer; |
|
property Modal: Boolean; |
|
property ModalForm: PControl; |
|
property WindowState: TWindowState; |
|
property HasBorder: Boolean; |
|
property HasCaption: Boolean; |
|
property CanResize: Boolean; |
|
property StayOnTop: Boolean; |
|
property Border: ShortInt; |
|
property Margin: ShortInt; |
|
property AlphaBlend: Byte; |
|
property StatusText[ Idx: Integer ]: KOLString; |
|
property SimpleStatusText: KOLString; |
|
property StatusPanelRightX[ Idx: Integer ]: Integer; |
|
property StatusWindow: HWND; |