Autor Beitrag
FatalError
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WIN ME
D6 Pers
BeitragVerfasst: Sa 20.12.03 18:48 
Hi,

mir ist aufgefallen, dass das folgende Programmstück schneller ausgeführt wird, wenn ich dabei die Maus auf dem Bildschirm bewege!???? :shock:


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
 Timer1.Interval:= 1;
 //Programmstück
end;


Kann man diesen Effekt irgendwie kompensieren?

Grüße
Andy :wink:
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 20.12.03 21:27 
Intervall 1! Das ist eine Millisekunde. Consumer Windows schafft aber nur eine Auflösung von ca. 40 ms, NT ff. bis 10 ms.
Du solltest eventuell über Threads nachdenken. Ein Timer ist meist ungeeignet regelmäßig Aktionen auszuführen.
FatalError Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

WIN ME
D6 Pers
BeitragVerfasst: Sa 20.12.03 23:14 
Hi,

danke für den Tip, werd ich versuchen!

Grüße
Andy