Autor Beitrag
Almidagu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26



BeitragVerfasst: Mo 27.06.05 10:57 
Guten Tag,

ich kann das folgende Problem nicht lösen: wenn mein Programm viel berechnet, kann Popup Menü nicht angezeigt werden.

Ich möchte mittels des Popups eine Möglichkeit haben, gerade diese Berechnungen zu unterbrechen.

Weil ich nicht weiter gehen kann, warte ich auf Ihre Hilfe.

Danke im Voraus
Almidagu
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Di 28.06.05 15:09 
Hallo,

setz "Application.ProcessMessages" ein.
Hier mal ein Beispiel-Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
var z,i : integer;
begin
 blAbbruch := False;
 for z := 0 to 1000000 do
   begin
     i := z;
     if z Mod 10 = 0 then
      begin
      Caption := 'Schleife '+intToStr(i);
      Application.ProcessMessages;
      if blAbbruch = True then
        Break;
      end;
   end;//Ende for z
end;

procedure TForm1.StopClick(Sender: TObject);
begin
  blAbbruch := True;
end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Almidagu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26



BeitragVerfasst: Mi 29.06.05 09:10 
Guten Tag Lannes!

Vielen Dank für Deine Hilfe. Jetzt kloniere ich "ProcessMessages" vielmals.

Grüße
Almidagu