Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
24. Jun 2003, 22:01
Delphi-Quellcode:
procedure delay(msec:longint);
var
start,stop:longint;
begin
start := gettickcount;
repeat
stop := gettickcount;
application.processmessages;
until (stop - start ) >= msec;
end;
function GetRandomNumber: Integer;
begin
result := Radom(10);
end;
procedure TForm1.Form1OnCreate(Sender: TObject);
begin
Randomize();
end;
procedure TForm1.Button2Click(Sender: TObject);
var i:integer;
begin
for i:=1 to 5 do
Edit1.Text := IntToStr(GetRandomNumber);
Delay(500);
Edit1.Text :=IntToStr(GetRandomNumber);
Delay(500);
Edit1.Text := IntToStr(GetRandomNumber);
end;
Michael Ein Teil meines Codes würde euch verunsichern.
|