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;
Application.MessageBox('确认吗?','Message',MB_YES);
var i:ingeger; begin i:=Application.MessageBox('确认吗?','询问',MB_YesNoCancel+MB_IconQuestion); if i=idyes then ... else if i=idno then ... else if i=idcancel then ... end;
Application.MessageBox('确认吗?','Message',MB_YESNO);
Application.MessageBox('确认吗?','Message',MB_YESNO);
mtConfirmation, [mbYes, mbNo], 0) = mrYes then
begin
MessageDlg('Exiting the Object Pascal application.', mtInformation,
[mbOk], 0);
Close;
end;
i:ingeger;
begin
i:=Application.MessageBox('确认吗?','询问',MB_YesNoCancel+MB_IconQuestion);
if i=idyes then
...
else if i=idno then
...
else if i=idcancel then
...
end;
begin
//
end
else
begin
end;