Codeblock Onlinehilfe

CloseForm()

CloseForm() – Form-Objekt schließen


Die Funktion schließt ein Form-Objekt.


Parameter

Beschreibung

aFormObject:O

TForm-Objekt


Rückgabewert


keiner

Beispiel


| oForm, oBtnCancel, oLblWait |

function DoClose(Sender)
   CloseForm(oForm),
end,

oForm             := CreateObject('TForm'),
oForm.BorderStyle := bsNone,
oForm.Width       := 366,
oForm.Height      := 100,
oForm.Caption     := 'CloseForm() Beispiel',
oForm.Position    := poScreenCenter,

oBtnCancel         := CreateObject('TButton', 'BtnCancel', oForm, oForm),
oBtnCancel.Width   := 150,
oBtnCancel.Height  := 20,

oBtnCancel.Top     := 10,
oBtnCancel.Left    := 100,

oLblWait         := CreateObject('TLabel', 'LblWait', oForm, oForm),
oLblWait.Width   := 300,
oLblWait.Height  := 40,
oLblWait.Caption := 'Bitte auf den Button drücken um das Fenster zu schließen!',
oLblWait.Top     := 60,
oLblWait.Left    := 40,

AssignEvent(oBtnCancel, 'OnClick', 'DoClose'),
ShowModal(oForm),


Weitere Verknüpfungen