interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
function closequery :boolean; override;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
close;
end;
function TForm1.closequery: boolean;
begin
if application.MessageBox('do you want close', 'query close', MB_OKCANCEL)
<> IDOK then result := false else result := true;
end;
end.