⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ufreemethread.pas

📁 就是这本书的随书代码。包括《实战Delphi 5.x-分布式多层应用系统篇》
💻 PAS
字号:
unit uFreeMeThread;

interface

uses
  Classes, SysUtils;

type
  FreezeMeThread = 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 FreezeMeThread.UpdateCaption;
    begin
      Form1.Caption := 'Updated in a thread';
    end; }

{ FreezeMeThread }

procedure FreezeMeThread.Execute;
var
  vID : WideString;
begin
  { Place thread code here }
  vID := WideString(IntToStr(ThreadID));
  Form1.cnFreezeMeServer.AppServer.FreezeMeFor(vID, StrToInt(Form1.edtFreezeMeThread.Text));
end;

end.

⌨️ 快捷键说明

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