procedure Calback(Sender: TComponent; AResult: Integer);
procedure TForm.Calback(Sender: TComponent; AResult: Integer);
begin
  case AResult of
    mrYes:
      begin

end;
    mrNo:
      begin

end;
  end;
end;

//fomr窗体不需要代码创建 如下会报错

var
  F_Envcategory: TF_Envcategory;
begin
  F_Envcategory := TF_Envcategory.Create(self);
  F_Envcategory.ShowModal(Calback);

FreeAndNil(F_Envcategory);

//直接调用
  F_Form.ShowModal(Calback);

//-------------------------------------------------

Form.ShowModal(
         procedure(Sender: TComponent; Res: integer)
          begin
                  case Res of
                        mrYes :
                        begin
                          UniEdit1.Text:='1';
                        end;
                        mrNo :
                        begin
                          UniEdit1.Text:='0';
                        end;
                  end;

end

);

ModalResult := mrYes;
 ModalResult := mrNo;

------------------------------------

MessageDlg('是否?', mtConfirmation, mbOKCancel,
    procedure(Sender: TComponent; Res: Integer)
    begin
      if Res = mrOk then
      begin
         
        end
        else
        begin
         
        end;

end;
    end);
---------------------
作者:ozhy111
来源:CSDN
原文:https://blog.csdn.net/ozhy111/article/details/83148923
版权声明:本文为博主原创文章,转载请附上博文链接!

unigui ShowModal、MessageDlg的更多相关文章

  1. UniGUI之提示信息MessageDlg及获得信息Prompt(15)

    UniGui的信息弹出框MessageDlg的原型定义如下: procedure MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons ...

  2. 小程序弹框wx.showModal、wx.showActionSheet、wx.showToast

    wx.showModal wx.showModal({ title: '删除图片', content: '确定要删除该图片?', showCancel: true,//是否显示取消按钮 cancelT ...

  3. uniGUI试用笔记(三)

    uniGUI下的MessageDlg使用发生了变化,最大的特点是: 1.成为了uniGUIForm的成员函数: 2.变成过程(procedure)了,也就是没有返回值了,使得程序不再具有线程阻塞性. ...

  4. wx: wx.showModal 回调函数中调用自定义方法

    一.在回调函数中调用自定义方法: 回调函数中不能直接使用this,需要在外面定义 var that = this 然后 that.自定义的方法.如下: //删除 onDelete: function ...

  5. uniGUI学习汇总

    UniGUI之UniLabel(31) uniGUI之自定义JS事件动作ClientEvents(30) uniGUI之文件下载(29) uniGUI之FDQuery(28) uniGUI之UniPo ...

  6. Delphi 7中的四种消息框

    Delphi中平常使用的消息框有四种形式,有ShowMessage.MessageDlg.Application.MessageBox.MessageBox.下面来深入了解下这四种形式的实现和使用.1 ...

  7. 【转】Delphi的消息对话框

    Delphi的消息对话框 输入输出inputBox()函数MessageBox()ShowMessage 对话框是Windows操作系统中程序与用户沟通的一种常见的交互方式,对话框可以向用户提供当前程 ...

  8. DELPHI XE Android 开发笔记

    第一次编译时,设定android SDK: F:\RAD Studio XE6\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk F:\RAD Stud ...

  9. delphixe10 android操作 打电话,摄像头,定位等

    XE6 不支持JStringToString.StringTojString.StrToJURI:use Androidapi.Helpers //Splash Image Delphi XE5,XE ...

随机推荐

  1. pwnable.kr-input-witeup

    查看代码,有5个stage,一一解决掉就能愉快看到flag了. 第一个stage: 解决方案: 第二个stage: 解决方案: 使用了os.pipe()函数功能,os.pipe()用于创建一个管道,返 ...

  2. docker制作镜像

    使用Dockerfile脚本创建jdk1.8镜像 新建jdk目录:(-p表示需要父目录,不然就会出错) mkdir -p /usr/local/dockerjdk1. 将jdk的压缩文件复制到上面的路 ...

  3. UEFI EVENT 全解

    Event和Timer在UEFI当中是怎么实现的以及原理,我们先从Timer开始,然后细细的拨开隐藏在底层的实现. 先说Timer,那什么是Timer呢?其实在中文里面我们把它叫做定时/计数器,但是我 ...

  4. java关于get/post请求

    package com.study.test; import java.io.BufferedReader;import java.io.IOException;import java.io.Inpu ...

  5. python基础(16)私有类,类,类变量

    1.私有类: class My: def test(self): self.__password = 123456 def say(self): print('password',self.__pas ...

  6. return this 和return * this

    this是指向自身对象的指针,*this是自身对象. 也就是说return *this返回的是当前对象的克隆或者本身(若返回类型为A, 则是克隆, 若返回类型为A&, 则是本身 ). retu ...

  7. 那一夜,风雪交加,我在搞jquery------专题之jquery选择器

    我们今天探讨下Jquery的用法,主要是研究选择器. 选择器可以分成四类: 1.基本选择器 核心代码: <script type="text/javascript"> ...

  8. Intellij IDEA 环境 tomcat 启动设置

    第一步:选择新的新的配置,我选择是Tomcat Server----->Local配置 第二步:配置Server属性 第三步:配置Deployment 第四步:配置Logs,默认配置 第五步:配 ...

  9. Mysql Navicat连接

    mysql -u root ip; 1.use mysql; 2.alter user 'root'@'localhost' identified with mysql_native_password ...

  10. 关于TypeError: strptime() argument 1 must be str, not bytes解析

    关于TypeError: strptime() argument 1 must be str, not bytes解析   在使用datetime.strptime(s,fmt)来输出结果日期结果时, ...