Autor Beitrag
magnitudo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31

WIN 8.1

BeitragVerfasst: Di 25.04.06 23:12 
Hallo zusammen,

ich möchte innerhalb einer REPEAT/UNTIL-Schleife die Systeminfo erhalten,
sobald der angeklickte Schalter losgelassen wird (OnMouseUp).

Kann mir da jemand weiterhelfen ?

Schon mal vielen Dank

Thomas
fidionael
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 232

Win XP SP2, Ubuntu 6.06
Delphi 7 PE, Delphi 3 Prof
BeitragVerfasst: Di 25.04.06 23:23 
Ja, du kannst seperat deiner REPEAT-Schleife dein Event abhorchen und global festhalten ob es eingetreten ist. Nun fragst du in deiner REPEAT-Schleife ob die Variable entsprechend gesetzt ist:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
//Global:
var
  Clicked: Boolean;

//Initialisierung:
procedure TForm1.FormCreate(Sender: TObject);
begin
  Clicked:=False;
end;

//Dein Event:
procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; 
                             Shift: TShiftState; X, Y: Integer);
begin
  Clicked:=TRUE;
end;

//Deine Hauptprozedur:
procedure TForm1.MainProc;
begin
  {...}
  REPEAT
    {...}
    Application.ProcessMessages;
  UNTIL Clicked;
  {...}
end;
magnitudo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31

WIN 8.1

BeitragVerfasst: Mi 26.04.06 14:33 
Hallo fidionael,

klasse Idee ! Funktioniert perfekt !

Vielen Dank für Deine Hilfe.

Gruß Thomas