Autor Beitrag
Delphi2009lover
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Fr 20.11.09 08:17 
Hi,

wenn ich eine Prozedure in meiner Form ausführe (die ca. 1 Minute etwas arbeitet) dann bleibt meine Form in der Zeit einfach hängen. Ich würde gerne den Fortschritt mit einer Progressbar auslesen, aber das geht ja nicht^^ bei Visual Studio gabs eine Komponente dafür (BackGroundWalker) leider habe ich die in Delphi nicht gefunden. Gibts da ne Möglichkeit für?

Thx im Vorraus
Nersgatt
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1581
Erhaltene Danke: 279


Delphi 10 Seattle Prof.
BeitragVerfasst: Fr 20.11.09 08:51 
Die schnelle (unschöne) Methode ist, innerhalb der Methode ab und zu mal Application.ProcessMessages aufzurufen. Die schöne, aber aufwändigere Methode ist, die Arbeit in einen Thread auszulagern.

Gruß,
Jens

_________________
Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Fr 20.11.09 09:34 
Ok mit einem THread habe ich jetzt noch nie gearbeitet^^ wie geht das denn?
Nersgatt
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1581
Erhaltene Danke: 279


Delphi 10 Seattle Prof.
BeitragVerfasst: Fr 20.11.09 09:44 

_________________
Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Fr 20.11.09 10:22 
Danke das hat sehr geholfen!!

EDIT: Mit diesem Application.ProcessMessages kann man ja das hängenbleiben "aufhalten" kann man damit dann auch eine 2.Funktion ausführen lassen, währen die 1. noch läuft?