zoukankan      html  css  js  c++  java
  • Delphi自定义了一个消息 范例

    //自己定义了一个消息 范例
    unit Unit1;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;

    const
      my_messagedisp=Wm_user+201;

    type
      TForm1 = class(TForm)
        Memo1: TMemo;
        Button1: TButton;
        
    procedure Button1Click(Sender: TObject);
      
    private
        { Private declarations }
        procedure  mymesspro2(var mymess: TMessage); message  my_messagedisp;
      
    public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}
    procedure TForm1.mymesspro2(var mymess: TMessage);
    begin
         memo1.Lines.Add('无法读取相关参数');
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      SendMessage(Form1.Handle,my_messagedisp,0,0); //测试通过
    end;

    end.

  • 相关阅读:
    iOS: ARC和非ARC下使用Block属性的问题
    HTTP POST GET 本质区别详解
    php输出json,需要嵌套数组和对象问题
    正则验证在线生成代码
    笔记
    按钮删除
    sudo dpkg-reconfigure phpmyadmin命令,重新配置一遍phpmyadmin
    Ubuntu 16.04 安装 Apache, MySQL, PHP7
    ubuntu18.04安装chrome浏览器
    初三知识点
  • 原文地址:https://www.cnblogs.com/tulater/p/1412927.html
Copyright © 2011-2022 走看看