惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
博客园 - 司徒正美
Last Week in AI
Last Week in AI
博客园 - 聂微东
Jina AI
Jina AI
月光博客
月光博客
爱范儿
爱范儿
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
T
Tailwind CSS Blog
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
罗磊的独立博客
小众软件
小众软件
雷峰网
雷峰网
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog

博客园 - 左左右右

连接 password ttreeview 一些汇编指令 Delphi与汇编 TObject.Dispatch TApplication与主消息循环 核心库类之TGraphicControl/TcustomControl 与画布(Canvas) 核心库类之TControl 核心库类之TObject 内存管理 触发器 模式窗体和非模式窗体 在dll中delphi中封装窗体(实例) dll 杂题 Delphi异常 Delphi与C++的语法区别 消息自定义
MessageDlg
左左右右 · 2007-04-27 · via 博客园 - 左左右右

1.MessageDlg function
在屏幕中间显示一个消息对话框
Displays a message dialog box in the center of the screen.
function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons;

HelpCtx: Longint): Word;

type TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom);
type
  TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll,

mbNoToAll, mbYesToAll, mbHelp);
  TMsgDlgButtons = set of TMsgDlgBtn;
const
  mbYesNoCancel = [mbYes, mbNo, mbCancel];
  mbYesAllNoAllCancel = [mbYes, mbYesToAll, mbNo, mbNoToAll, mbCancel];
  mbOKCancel = [mbOK, mbCancel];
  mbAbortRetryIgnore = [mbAbort, mbRetry, mbIgnore];
  mbAbortIgnore = [mbAbort, mbIgnore];
begin
  if MessageDlg('Welcome to my Object Pascal application.  Exit now?',
    mtConfirmation, [mbYes, mbNo], 0) = mrYes then
  begin
    MessageDlg('Exiting the Object Pascal application.', mtInformation,
      [mbOk], 0);
    Close;
  end;
2.ShowMessage
出现一个含有ok按钮的消息框
Displays a message box with an OK button.
procedure ShowMessage(const Msg: string);
3.MessageBox
为用户显示一个特定的消息
Displays a specified message to the user.
function MessageBox(const Text, Caption: PChar; Flags: Longint = MB_OK): Integer;
with Application do
  begin
    NormalizeTopMosts;
    MessageBox('This should be on top.', 'Look', MB_OK);
    RestoreTopMosts;
  end;