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 检查ip地址合法性

Delphi 判断文件是否被使用

Delphi 屏幕整体拉出源代码

Delphi firedac 的recordcount 相关测试 记录

Delphi xe tparallel.for的用法

Delphi 软件welcome窗口代码

Delphi 注释方法

Delphi 如何获取重载函数的地址

Delphi webbrowser控件属性介绍

Delphi 中的自动引用计数使用规则

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



打赏

取消

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

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

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

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

评论

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