unit Unit2;
interface
uses
Classes,Graphics,windows, ExtCtrls;
type
paintclock = class(TThread)
private
fbox:tpaintbox;
a:integer;
b,c,x,y:integer;
proceduredo
drawlines;
protected
procedure drawlines;
procedure Execute;
override;
public
constructor create(box:tpaintbox);//这里重造建构函数。
end;
implementation
procedure paintclock.drawlines;
begin
...
end;
constructor paintclock.create(box:tpaintbox);
begin
a:=0;
fbox:=box;
freeonterminate:=true;
inherited create(false);
end;
procedure paintclock.Execute;
begin
drawlines;
end;
procedure paintclock.dodrawlines;
begin
...
end;
end.