[Delphi] programm immer im vordergrund
hi,
ich möchte eine 2. form von meinem programm immer im vordergrund halten. das funktioniert am besten so:
procedure TForm2.FormShow(Sender: TObject);
begin
SetWindowPos(Handle, HWND_TOPMOST, Left,Top, Width, Height, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
SetWindowLong(Handle, GWL_HWNDPARENT, 0);
end;
das problem dabei ist, dass ich dann einen Taskbareintrage habe. den möchte ich jedoch nicht.
Kann mir jemand helfen?
Gruß
ich möchte eine 2. form von meinem programm immer im vordergrund halten. das funktioniert am besten so:
procedure TForm2.FormShow(Sender: TObject);
begin
SetWindowPos(Handle, HWND_TOPMOST, Left,Top, Width, Height, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
SetWindowLong(Handle, GWL_HWNDPARENT, 0);
end;
das problem dabei ist, dass ich dann einen Taskbareintrage habe. den möchte ich jedoch nicht.
Kann mir jemand helfen?
Gruß
RE: [Delphi] programm immer im vordergrund
procedure TForm2.FormShow(Sender: TObject);
begin
SetWindowPos(Handle, HWND_TOPMOST, Left,Top, Width, Height, 0);
ShowWindow(GetWindow(Handle, GW_OWNER), SW_HIDE);
SetWindowLong(Handle, GWL_HWNDPARENT, 0);
end;
so
begin
SetWindowPos(Handle, HWND_TOPMOST, Left,Top, Width, Height, 0);
ShowWindow(GetWindow(Handle, GW_OWNER), SW_HIDE);
SetWindowLong(Handle, GWL_HWNDPARENT, 0);
end;
so
Fighting for peace is like fucking for virginity


