delphi MessageBox
procedure TForm1.btn1Click(Sender: TObject);
begin
ShowMessage('这是ShowMessage消息框');
ShowMessage('这是ShowMessage换行消息框' + #13#10 +http://www.cnblogs.com/yangxuming/');
MessageDlg('这是MessageDlg消息框', mtCustom, [mbOK], 0);
if MessageDlg('这是MessageDlg消息框', mtWarning, mbOKCancel, 0) = mrOk then
begin
//···
end;
Application.MessageBox('这是Application.MessageBox消息框', '标题', MB_OK);
if Application.MessageBox('这是Application.MessageBox消息框', '标题', MB_OKCANCEL + MB_ICONQUESTION + MB_DEFBUTTON2 + MB_TOPMOST) = IDOK then
begin
//···
end;
MessageBox(0, '这是MessageBox消息框', '标题', MB_OK);
MessageBox(Handle, '这是MessageBox消息框', '标题', MB_OK);
case MessageBox(Handle, '这是MessageBox消息框', '标题', MB_YESNOCANCEL + MB_ICONSTOP + MB_DEFBUTTON3) of
IDCANCEL:
begin
//···
end;
IDYES:
begin
//···
end;
IDNO:
begin
//···
end;
end;
end;