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 对zlib单元进行再封装

Delphi自动适应屏幕分辨率的属性

Delphi 有关debughook

Delphi 网页数据抓取

Delphi dll 字符串传递例子

Delphi fdlocalsql使用方法

Delphi getfilehashmd5

Delphi 取控件下的图象

Delphi 基础学习 字符串去掉回车符

Delphi sql server备份脚本

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



打赏

取消

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

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

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

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

评论

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