FormCloseQuery
void __fastcall TForm1::FormCloseQuery(TObject *Sender, bool &CanClose){
if (MessageDlg("Close the form?", mtConfirmation, TMsgDlgButtons() << mbOK << mbCancel,0) == mrCancel)
CanClose = false;
}
void __fastcall TForm1::FormCloseQuery(TObject *Sender, bool &CanClose){
if (MessageDlg("Close the form?", mtConfirmation, TMsgDlgButtons() << mbOK << mbCancel,0) == mrCancel)
CanClose = false;
}