Setting Application.Handle as a top-level window' owner

Posted by Serg on Stack Overflow See other posts from Stack Overflow or by Serg
Published on 2010-02-08T18:03:01Z Indexed on 2010/03/23 8:53 UTC
Read the original article Hit count: 373

Filed under:
|
|

I want the main form to appear above some other application forms (in z-order), so I override CreateParams method for these forms as follows:

procedure TForm3.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.WndParent:= Application.Handle;
end;

I know the Application.Handle was the top-level windows' owner before Vista (and Delphi 2007). What is wrong with it in Vista (and Windows 7)? What potential problems may arise if I set Application.Handle as a top-level window owner?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about delphi-2009