begin
if MessageDlg('Welcome to my Object Pascal application. Exit now?',
mtConfirmation, [mbYes, mbNo], 0) = mrYes then
begin
MessageDlg('Exiting the Object Pascal application.', mtInformation,
[mbOk], 0);
Close;
end;
end;
3.function MessageBox(const Text, Caption: PChar; Flags: Longint): Integer;
if Application.MessageBox(
'Could not open Table1 exclusively - Try again?',
'Open Error',
MB_OKCANCEL + MB_DEFBUTTON1) <> IDOK then
raise;
看看帮助吧!