咪
咪咪富翁
Unregistered / Unconfirmed
GUEST, unregistred user!
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure sa.execute;
begin
try
freeonterminate:=true;
//线程结束后自动退出内存
if form1.SpeedButton2.top>20 then
repeat
form1.SpeedButton2.top:=form1.SpeedButton2.top-1;
form1.Refresh;
until
form1.SpeedButton2.top=20
else
while form1.SpeedButton2.top<200do
form1.SpeedButton2.top:=form1.SpeedButton2.top+1;
finally
end;
end;
procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
ywx:=sa.create(false);
end;
end.
初学线程,我写了这么一段程序,我想把speedbutton的名字作为参数传给我的线程
请问该怎么做??
Form1: TForm1;
implementation
{$R *.dfm}
procedure sa.execute;
begin
try
freeonterminate:=true;
//线程结束后自动退出内存
if form1.SpeedButton2.top>20 then
repeat
form1.SpeedButton2.top:=form1.SpeedButton2.top-1;
form1.Refresh;
until
form1.SpeedButton2.top=20
else
while form1.SpeedButton2.top<200do
form1.SpeedButton2.top:=form1.SpeedButton2.top+1;
finally
end;
end;
procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
ywx:=sa.create(false);
end;
end.
初学线程,我写了这么一段程序,我想把speedbutton的名字作为参数传给我的线程
请问该怎么做??