可爱的 CreateMessageDialog    


unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, StdCtrls;type  TForm1 = class(TForm)    Button1: TButton;    Button2: TButton;    Button3: TButton;    procedure FormCreate(Sender: TObject);    procedure Button1Click(Sender: TObject);    procedure Button2Click(Sender: TObject);    procedure Button3Click(Sender: TObject);  end;var  Form1: TForm1;implementation{$R *.dfm}var  MsgInfo, MsgErr: TForm;procedure TForm1.FormCreate(Sender: TObject);begin  MsgErr := CreateMessageDialog('错误', mtError, [mbOK]);  MsgInfo := CreateMessageDialog('提示', mtInformation, [mbYes, mbNo], mbYes);end;procedure TForm1.Button1Click(Sender: TObject);begin  MsgErr.ShowModal;end;procedure TForm1.Button2Click(Sender: TObject);begin  MsgInfo.ShowModal;end;procedure TForm1.Button3Click(Sender: TObject);begin  case MsgInfo.ShowModal of    IDYES: Text := 'Yes';    IDNO : Text := 'No';  else    Text := 'Form1';  end;end;end.


©著作权归作者所有:来自51CTO博客作者JLee79的原创作品,如需转载,请注明出处,否则将追究法律责任

更多相关文章

  1. 使用 IXMLHTTPRequest 简单获取网页源代码
  2. ExtCtrls.Frame3D
  3. 关于分库分表后的数据统计异构方案
  4. nginx开启日志,指定格式,查看执行时间
  5. windows server 2016安装网卡驱动【引用】
  6. 解密代码
  7. 发文章加密教程
  8. pycharm用爱发电
  9. arc_loss训练手写数字分类

随机推荐

  1. Android Q正式版发布时间确定!详细介绍内
  2. Android需要复合人才
  3. Android 上如何移植live555生成库文件
  4. android总结之android初识
  5. Android UI系列
  6. android 屏幕适配
  7. Android真的很火吗?
  8. Android(Xamarin)之旅(五)
  9. Android动画设计第3弹
  10. Android基础备忘(android中的分享功能)