Board index » delphi » Keeping child form open when main form is minimized - non-MDI

Keeping child form open when main form is minimized - non-MDI

I apologize, because I know this has been answered before...

I must offer the option to keep a child form open on the desktop when the
application has been minimized. I tried changing the child form's parent via
the vcl and directly from the API, but no success. I'm on to look into the
forms unit code for application.minimize, but hoped somebody might have the
answer ready...

Thanks,

Scott

 

Re:Keeping child form open when main form is minimized - non-MDI


Quote
> I must offer the option to keep a child form open on the desktop when the
> application has been minimized. I tried changing the child form's parent via
> the vcl and directly from the API, but no success. I'm on to look into the
> forms unit code for application.minimize, but hoped somebody might have the
> answer ready...

reparent the secondary forms to the desktop

procedure TForm2.CreateParams(Var params: TCreateParams);
  begin
    inherited CreateParams( params );
    params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
    params.WndParent := GetDesktopwindow;
  end;

Try to avoid showing modal forms from this form, if you need to show a message
use Windows.Messagebox and feed it the handle of the form.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads