Topic: Procedure Close On Form1
I have the following Procedure and I want when I press the Close ( X button on the right upper form )
when I add the name of the procedure (Telos) in the Form Events OnClose it doesn't work. How can I do it o show me the messagebox from the procedure Telos?
Procedure Telos (Sender: TObject; var Cancel: boolean);
messagebeep(0);
if IDNO = MessageBox('It will end , are you sure ?', 'Question', MB_YESNO+MB_ICONQUESTION) then // If the user clicked No
begin
Cancel := True; // If the Cancel parameter is set to True, the action that is assigned to the button will not be executed
exit;
end;
frmApografi.Close;
end;