uholdmethread.pas

来自「delphi多层应用系统 delphi多层应用系统」· PAS 代码 · 共 44 行

PAS
44
字号
unit uHoldMeThread;

interface

uses
  Classes, SysUtils;

type
  HoldMeThread = class(TThread)
  private
    { Private declarations }
  protected
    procedure Execute; override;
  end;

implementation

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

      Synchronize(UpdateCaption);

  and UpdateCaption could look like,

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

{ HoldMeThread }

procedure HoldMeThread.Execute;
var
  vID : WideString;
begin
  { Place thread code here }
  { Place thread code here }
  vID := WideString(IntToStr(ThreadID));
  Form1.cnHoldMeServer.AppServer.HoldMeFor(vID, StrToInt(Form1.edtHoldMeThread.Text));
end;

end.

⌨️ 快捷键说明

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