Autor Beitrag
ski20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Do 14.09.06 17:14 
Hallo all,

Hab ein Problem mit eine kleine Programm das "Ein" oder "aus" für ein 8 Kanal reliasbord aus eine Gridstring liest...und das 30 mal in eine schleife. Zwischen jede reihe ein 3 oder 4 Sekunden pause mit "sleep" und ein 3 Bytes an der Relaisbord schicken via com1. PROBLEM ist wenn das Programm läuft ist im Programm nichts anderes möglich nicht mal in der Grid scrollen.... bis der schleife zu ende gelaufen ist.
Wo dran kann so was liegen ? hab n andere prog. die in eine dauer schleife Dateien abholt per ftp get von 50 verschiedene ip Adressen ...und wenn das läuft kann ich immer noch andere eingeben machen.

Danke Mark
DarkLord05
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Do 14.09.06 17:17 
Das "sleep(ms)" friert das Programm komplett ein. Such mal nach delay hier im Forum oder mach es mit Threads ;)
ski20 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Fr 15.09.06 09:43 
Titel: Danke Darklord
Danke danke ....bin nicht so fit ....alles per learning by doing, daher verstehe nix von Threads!!!, aber werde nach "Delay" suchen.

Vielen Dank sie haben sehr geholfen.

Mark
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Fr 15.09.06 10:07 
Ja, da gabs diese Funktion, die sleep ersetzen sollte, wenn das Programm nicht einfrieren soll:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure delay(ms: Cardinal);
var ticks: Cardinal;
begin
   ticks:=GetTickCount;
   while GetTickCount-ticks < ms do
      Application.ProcessMessages;
end;

So ging das, oder? Siehe auch diverse andere Threads.

user profile iconski20 hat folgendes geschrieben:
Vielen Dank sie haben sehr geholfen.

:shock: nich siezen ;)

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
ski20 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Fr 15.09.06 11:35 
Titel: Geht !! funkt. jetzt Super
Danke..........so habe ich das jetzt gemacht !! funkt. echt super.

Danke noch mal
Mark

ps nice weekend