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;

相关阅读 >>

Delphi xe 的 tdictionary

Delphi idhttp上传图给asp完美解决

Delphi 编译发布安卓的app名字问题

Delphi 以二进制方式读取图片保存到string

Delphi 日期相关总结20190702完结篇

Delphi 10.2 创建并使用资源文件

Delphi tgauge类的定义在哪个单元中定义的?

Delphi getexplorerpid获取系统explorer.exe进程id

Delphi getsys32path()得到系统system32路径

Delphi xe5 给edit增加自定义按钮

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...