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

📄 waitformpas.pas

📁 是一个用delphi设计的考勤系统
💻 PAS
字号:
unit WaitFormPas;

interface

uses
  Windows, Messages, SysUtils, WinProcs, Classes, Forms, ExtCtrls;

type
  WaitThread = class(TThread)
  private
    { Private declarations }
    Waitform,temp:Tpanel;
  protected
    procedure Execute; override;
    destructor destroy;override;
  public
    constructor Create(myform:tpanel);virtual;
  end;

implementation

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

{ WaitThread }

constructor WaitThread.Create(myform:tpanel);
begin
   inherited  create(true);
   temp:=myform;
   FreeOnTerminate:=false;
   waitform:=nil;
   resume;
end;

procedure WaitThread.Execute;
begin
  { Place thread code here }
   WaitForm:=Tpanel.Create(temp);
   waitform.Parent :=temp;
   waitform.Caption :='数据处理中,请稍后......';
end;

destructor WaitThread.destroy;
begin
   waitform.Free ;
   inherited
end;
end.
 

⌨️ 快捷键说明

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