zoukankan      html  css  js  c++  java
  • TTimer很特殊

    TTimer = class(TComponent)
    private
    FInterval: Cardinal;
    FWindowHandle: HWND;
    FOnTimer: TNotifyEvent;
    FEnabled: Boolean;
    procedure UpdateTimer;
    procedure SetEnabled(Value: Boolean);
    procedure SetInterval(Value: Cardinal);
    procedure SetOnTimer(Value: TNotifyEvent);
    procedure WndProc(var Msg: TMessage);
    protected
    procedure Timer; dynamic;
    {$IF DEFINED(CLR)}
    strict protected
    procedure Finalize; override;
    {$IFEND}
    public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    published
    property Enabled: Boolean read FEnabled write SetEnabled default True;
    property Interval: Cardinal read FInterval write SetInterval default 1000;
    property OnTimer: TNotifyEvent read FOnTimer write SetOnTimer;
    end;

    明明继承自TComponent,不仅自带FWindowHandle 而且自定义WndProc ,留个爪,以后再回来研读。可能是不想带上TControl或者TWinControl的其它一大堆玩意吧。

  • 相关阅读:
    mysql的四种隔离
    mysql-事物
    Mysql数据备份
    线程池
    springboot整合log4j2
    springboot项目部署
    数组去重
    倒叙输出算法
    使用LLDB和debugserver对ios程序进行调试
    Linux使用pyinstaller 编译py成可执行程序
  • 原文地址:https://www.cnblogs.com/findumars/p/3667183.html
Copyright © 2011-2022 走看看