thread.pas

来自「16 relay output channels and 16 isolated」· PAS 代码 · 共 43 行

PAS
43
字号
unit Thread;

interface

uses
  Classes, Forms;

type
  CheckThread = class(TThread)
  private
    { Private declarations }
//      frm      : MainForm;
  protected
    procedure Execute; override;
  end;
//var
//      chkThread : CheckThread;
implementation
uses MainForm;

{ Important: Methods and properties of objects in VCL or CLX can only be used
  in a method called using Synchronize, for example,

      Synchronize(UpdateCaption);

  and UpdateCaption could look like,

    procedure CheckThread.UpdateCaption;
    begin
      Form1.Caption := 'Updated in a thread';
    end; }

{ CheckThread }

procedure CheckThread.Execute;
begin
  { Place thread code here }
   frmMain.CheckEvent();
end;


end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?