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 memo 控件光标定位

比cmd更强大的命令行wmic

Delphi 串口查询所有com口

Delphi win10系统已管理员的权限运行应用程序

Delphi xe中使用tchart绘制平滑曲线

Delphi数组之菜鸟篇

Delphi 通过memorystream 传递image1数据

Delphi function 与 procedure

Delphi escape/unescape编码

Delphi 关于 beep、messagebeep 和 windows.beep

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



打赏

取消

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

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

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

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

评论

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