Einzelnen Beitrag anzeigen

lasermouse

Registriert seit: 16. Dez 2007
12 Beiträge
 
#4

Re: "Echte" StayOnTop Form öffnen

  Alt 17. Dez 2007, 23:58
Zitat von holliesoft:
Hallo,

Du must beim TApplication.OnDeactivate ein Application.RestoreTopMosts ausführen.

Gruß
Patrick
Das bringt leider auch nichts ;( Die Form verdeckt weiterhin bloß Delphi-Forms.

Hier der aktuelle Code:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
form2.show;
delay(100);
SetWindowPos(form2.Handle ,HWND_TOPMOST,0,0,0,0,SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
end;

procedure TForm2.FormDeactivate(Sender: TObject);
begin
Application.RestoreTopMosts;
end;
  Mit Zitat antworten Zitat