Autor Beitrag
Wolle92
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mi 19.11.08 17:11 
Hallo,

ich habe 3 Forms geöffnet: Form1, Form3 und Form9...
Jetzt wird bei einem Klick auf einen Button in Form9 dieselbe versteckt...
Problem: In diesem Moment wird die Form1 in den Vordergrund gesetzt, was sie aber eigentlich nicht soll, weil in Form3 gearbeitet wird...

Wie kann ich das ganze unterbinden? weil BringTofront extra aufrufen finde ich irgendwie unschön, wenns ne andere lösung gibt...

Grüße,
Wolle

Edit: ich glaube, es liegt eher an dem Form3.Enabled := true, weil das Form3.BringToFront nach Form9.Hide bringts nicht...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm9.Button1Click(Sender: TObject);
begin
  Form9.Hide;
  Form3.BringToFront;                      // geht nicht
  Form3.Enabled := true;
  Form3.BringToFront;                      // geht
  Form3.saveQueryResult := Edit1.Text;
  Form3.saveQueryRunning := false;
end;

_________________
1405006117752879898543142606244511569936384000000000.