Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Vordergrund bei nicht-hauptformular (https://www.delphipraxis.net/26241-vordergrund-bei-nicht-hauptformular.html)

Basic-Master 20. Jul 2004 20:15


Vordergrund bei nicht-hauptformular
 
hi,
ich hab in meinem programm ne splashscreen und n normales formular.. davon sollte das normale formular eigentlich immer on-top sein, hab auch schon den tip hier (der letze post) versucht, allerdings ohne erfolg :( hab beide formulare auf fsStayOnTop gesetzt und den code
Delphi-Quellcode:
SetWindowPos(Handle, HWND_TOPMOST, Left,Top, Width,Height, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE);
in das OnShow-Event eingebaut.. hat aber wie gesagt bei mir nicht funktioniert.. was hab ich falsch gemacht :roll:

Basic-Master 21. Jul 2004 11:31

Re: Vordergrund bei nicht-hauptformular
 
ah, hab nochmal bissl inner dp gesucht und nen gefundenen code modifiziert:
Delphi-Quellcode:
procedure TfrmMain.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  if Assigned(Application.MainForm) then
  begin
    Params.WndParent := Application.MainForm.Handle;
    Params.Style := Params.Style or WS_VISIBLE;
  end;
end;
das muss man halt nur noch als override prozedur deklarieren und es funzt :P


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:07 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz