Autor Beitrag
Franky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 18

Windows 98; xphomeedition
Delphi 2007 RAD Studio
BeitragVerfasst: Do 19.05.05 19:18 
Hi Leute

Ich versuche mich grad dran, Sleep() ein zu bauen, aber Delphi sacht, die Funktion gebe es nicht. Kann mir da mal wer eben auf die Sprünge helfen, woran das liegt? hab wahrscheinlich bei Uses wat vergessen, oder?

Danke :)

_________________
Hier könnte ihre Werbung stehen
Holgerwa
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 325

WIN XP Pro, Vista Business
Delphi 7 Pro, BDS 2006 Pro
BeitragVerfasst: Do 19.05.05 19:24 
Hallo,

Du brauchst "SysUtils" in Deinen "Uses".

Holger
Franky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 18

Windows 98; xphomeedition
Delphi 2007 RAD Studio
BeitragVerfasst: Do 19.05.05 19:38 
Oh man, ich bin zu blöd dafür :oops:

ausblenden Delphi-Quelltext
1:
uses msum,SysUtils,mtWindmuele,mTrechteckknopf,mTkreisknopf;					


Und
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TAnwendung.immer;
begin
  sleep(12);
  erstewindmuele.drehe;
end;


Ergebnis ist das gleiche wie vorher :?

_________________
Hier könnte ihre Werbung stehen
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 19.05.05 19:50 
Falsch, nicht "SysUtils" sondern "Windows", da Sleep() eine API-Funktion ist..! ;)

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Franky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 18

Windows 98; xphomeedition
Delphi 2007 RAD Studio
BeitragVerfasst: Do 19.05.05 19:57 
Danke, dat geht ja echt schnell hier :)

Aber nun mal noch ne allgemeine Frage, damit ich euch in Zukunft nicht mehr mit sowas belästigen muss :)

Wo kann ich denn in der Hilfe sehen, welche Uses gebraucht werden für die Funktion? Irgendwie komm ich da noch net so ganz mit klar

_________________
Hier könnte ihre Werbung stehen
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 19.05.05 20:13 
Also die ganzen API-Funktionen sind (fast) alle in der Unit "Windows". Für die ganzen Delphi-spezifischen Funktionen steht das eh immer in der Hilfe extra dabei in welcher Unit die ist.

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Holgerwa
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 325

WIN XP Pro, Vista Business
Delphi 7 Pro, BDS 2006 Pro
BeitragVerfasst: Fr 20.05.05 04:47 
@Motzi: Das ist ja seltsam. Ich hatte es nicht ausprobiert, sondern nur in der Hilfe nachgesehen, und da steht bei mir (Delphi 7 Pro):
Sleep (Prozedur), Unit SysUtils.

Aber da es ja so nicht funktioniert, ist das wohl ein Schreibfehler in der Hilfe? :shock:

Holger
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Fr 20.05.05 05:37 
Bei D6 gibt es die Prozedur sleep in der Windows-Unit und in der SysUtils-Unit.
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Fr 20.05.05 06:18 
Die Hlfe in D3 kennt das anscheinend gar net.

Nach dem sleep sollte doch Application.ProcessMessages stehen, oder?
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Fr 20.05.05 16:27 
Brauchst du nicht. Wäre aber günstiger.
Mit sleep wird das Programm vom Prozessor genommen und mit Application.ProcessMessage kannst du mit dem Programm auf Ereignisse reagieren, so dass z.B. das Formular immer wieder neu gezeichnet wird oder dass das Programm beendet werden kann, während es etwas berechnet.
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 22.05.05 15:10 
Gernau das meien ich ja, erwird's ja kaum beim oben genannten Code belasen.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 22.05.05 15:19 
Was war dann deine Frage?
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 22.05.05 15:24 
Das war mehr ne Feststellung oder eine Aussage. :wink: