O
optn3
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
randomize;
for i := 1 to 500do
begin
Edit1.Text:=floattostr(random(10));
Sleep(10);
Edit1.Update;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
form1.Label1.Caption := datetimetostr(now);
end;
当我执行botton1时,label1不能同时显现时间.
请问,Timer1是不是要作为一线程还是做其它修改,望大师贴代码?
var
i: integer;
begin
randomize;
for i := 1 to 500do
begin
Edit1.Text:=floattostr(random(10));
Sleep(10);
Edit1.Update;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
form1.Label1.Caption := datetimetostr(now);
end;
当我执行botton1时,label1不能同时显现时间.
请问,Timer1是不是要作为一线程还是做其它修改,望大师贴代码?