Autor Beitrag
TheNeon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Mi 16.04.03 13:26 
Hallo Leute,

versuche gerade ein anderes Programm aufzurufen, allerdings mit einer Verzögerung von 20sec ...... verwende ich den SLEEP-Befehl, so ist mein Programm für diese 20sec ausser Betrieb. Ihr könnt euch ja vorstellen, dass ich das nicht will :wink: . Kann mir da jemand helfen?

DANKE

_________________
Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt.
(c) Albert Einstein
Alibi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458

Win2K SP3
Delphi 6 Ent
BeitragVerfasst: Mi 16.04.03 13:39 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure Delay(t: DWord);
var
  Tick:DWord;
begin
  Tick:=GetTickCount;
  repeat
    Application.ProcessMessages;
  until ((GetTickCount - Tick) > t);
end;
ShadowCaster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 312



BeitragVerfasst: Mi 16.04.03 13:42 
Schonmal an einen Timer gedacht? auch wenn ein Timer ungenau ist, reicht doch ;)
TheNeon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Mi 16.04.03 14:10 
boah ne ....................
manchmal sieht man echt den Baum vor lauter Wälder nicht :wink: :D

3 Tage durchproggen bekommen mir wohl nicht :roll: ........ der Timer .... KLAR DOCH :x

danke danke

so, ich gehe jetzt erstmal in die Ecke und schäme mich ganz doll :roll:

_________________
Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt.
(c) Albert Einstein
Alibi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458

Win2K SP3
Delphi 6 Ent
BeitragVerfasst: Mi 16.04.03 14:12 
Und kommst aus deiner Ecke nicht mehr raus besser, für sowas verwendet man doch nicht den Timer! Weitaus eleganter ist eine eigene Delay/Sleep Procedure, wie ich sie gepostet habe.
TheNeon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Mi 16.04.03 14:21 
Alibi hat folgendes geschrieben:
Und kommst aus deiner Ecke nicht mehr raus besser, für sowas verwendet man doch nicht den Timer! Weitaus eleganter ist eine eigene Delay/Sleep Procedure, wie ich sie gepostet habe.


so ...... schon wieder raus aus der Ecke 8) :P
naja, komm ..... ein Timer ist schnell gemacht .... und bringt meinen Quelltext nicht noch mehr zum Überquillen :wink: :lol:

... aber trotzdem danke

_________________
Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt.
(c) Albert Einstein