Pages

Saturday, December 31, 2011

How to create close confirmation in delphi

This post will discuss about how to create a dialog box confirmation when user want to close a form in delphi. Below is the code :
  if MessageDlg('Are you sure you want to close the form?', mtConfirmation,
    [mbOk, mbCancel], 0) = mrCancel then
      CanClose := False;
Paste that code on event OnCloseQuery of form.

No comments:

Post a Comment

Don't Forget To Join Our Community
×
Widget