Autor Beitrag
Smartie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Mi 08.06.05 06:51 
Hallo,

gibt es unter Delphi soetwas wie eine Warte-Funktion? Also eine Funktion welche eine Pause hervorruft, bevor mal fortfährt? Etwas einfaches, so wie "warte 500ms".

Hab in der OH nachgeschaut, aber nichts gscheits gefunden.

Herzlichen Dank und lieben Gruß

Smartie
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mi 08.06.05 07:05 
Hallo,

versuche es einmal mit Sleep

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 08.06.05 09:52 
Sleep legt aber den gesamten Thread schlafen - es werden also auch keine Messages abgearbeitet. Eine Alternative wäre Suche in: Delphi-Forum, Delphi-Library DELAY..

Gruß, Motzi

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
chaos4ever
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Mi 08.06.05 21:15 
Könntest du nich einfach einen Timer implementieren?

Nur so ne Idee... sorry, wenn es dich nicht weiterbringt
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Fr 10.06.05 08:19 
Danke für die Antworten, ich glaub, mit delay komm ich weiter, das Problem scheint jedoch "leicht" nebensächlich geworden zu sein.

Danke für Eure Hilfe

Smartie
Smartie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 205



BeitragVerfasst: Fr 10.06.05 10:01 
ähm... kleines problem... mein delphi kentn delay nicht... köntne es sien, das dies in einer neueren Version von Delphi erst auftaucht? Ich habe Delphi7.

Lieben Gruß

Smartie
ploRa
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59

Win XP
Delphi 6
BeitragVerfasst: Fr 10.06.05 10:04 
Nach meinem kleinen Wissen musst du eine "Delay" Procedure erst schreiben bevor du die Delay Funktion überhaupt nutzen kannst !
ploRa
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59

Win XP
Delphi 6
BeitragVerfasst: Fr 10.06.05 10:12 
Also ich meine die ginge so !

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure Delay(Zeit: longint);
var Zeit1,zeit2 :longint;
begin
Zeit1:= Gettickcount;
repeat
zeit2:= gettickcount;
application.ProcessMessages;
until (zeit2-zeit1 > zeit);
end;

end.


Nun kannst du dein Programm an deiner beliebigen stelle mit dem Befehl
ausblenden Delphi-Quelltext
1:
Delay(1000);					

pausieren lassen !

Ich hoffe das hilft dir weiter

Mfg

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Fr 10.06.05 10:59 
Delphi enthält, im Gegensatz zu Pascal, keine eigene Delay-Funktion, die muss man sich selbst bauen.
Die klassische Variante schaut so aus wie die von ploRa gepostete. Ich hab aber eine bessere Version ohne busy-waiting in die FAQs eingetragen: www.delphi-forum.de/...&highlight=delay

Gruß, Motzi

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!