F
fanronghua
Unregistered / Unconfirmed
GUEST, unregistred user!
TMyThread = class(TThread)
protected
FormT: TForm;
procedure Execute;
override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TMyThread.Execute;
var
i: integer;
begin
while truedo
begin
FormT.Canvas.LineTo(3, 8);
// Sleep(500);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
MYT: TMyThread;
begin
MYT := TMyThread.Create(false);
MYT.FormT := Self;
MYT.Execute;
end;
protected
FormT: TForm;
procedure Execute;
override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TMyThread.Execute;
var
i: integer;
begin
while truedo
begin
FormT.Canvas.LineTo(3, 8);
// Sleep(500);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
MYT: TMyThread;
begin
MYT := TMyThread.Create(false);
MYT.FormT := Self;
MYT.Execute;
end;