对话框Dialogs in Delphi
提示:弹窗的各种模式
核心源代码
procedure TForm1.Button10Click(Sender: TObject);
begin
// Multiple buttons, default is OK
case (MessageDlg(‘Multiple Buttons’, mtInformation, [mbYes, mbNo, mbOK,
mbCancel, mbAbort, mbRetry, mbIgnore], 0, mbOK)) of
mrYes:
Label8.Caption := ‘Yes’;
mrNo:
Label8.Caption := ‘No’;
mrOk:
Label8.Caption := ‘OK’;
mrCancel:
Label8.Caption := ‘Cancel’;
mrAbort:
Label8.Caption := ‘Abort’;
mrRetry:
Label8.Caption := ‘Retry’;
mrIgnore:
Label8.Caption := ‘Ignore’;
end;
end;
procedure TForm1.Button11Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Butto