Main文件如下:
unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, imGauge;
type
TForm1 = class(TForm)
Button1: TButton;
edtRandom: TEdit;
imGauge1: TimGauge;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses MagicService, ThrdGetRand;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Thrd:TThrdGetRandom;
begin
imGauge1.IsAnimating:=True;
Thrd:=TThrdGetRandom.Create(True);
Thrd.FreeOnTerminate:=True;
Thrd.Resume;
end;
end.