- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 弹出带黄色感叹号对话框提醒
procedure MsgWarning(const Msg: string);
begin
Application.MessageBox(PChar(Msg), 'Warning', MB_OK + MB_ICONWARNING);
end;
procedure MsgInformation(const Msg: string);
begin
Application.MessageBox(PChar(Msg), 'Information', MB_OK + MB_ICONINFORMATION);
end;
function MsgQuestion(const Msg: string):Boolean;
begin
Result:= Application.MessageBox(PChar(Msg), 'Information', MB_YESNO + MB_ICONINFORMATION)=IDYES;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
MsgWarning('提示'); //黄色叹号
MsgInformation('提示'); //蓝色叹号
MsgQuestion('提示'); //是 否 对话框
end;