Hi! There's one little problem that torments me already for two days. Project I work with is too complex to describe it here, so I try to simplify task. Imagine you have simple application with one main form and one topmost form (FormStyle = fsStayOnTop). Topmost form is always above the main form (even if it is deactivated).
I need to have one more form that should action as another application. E.g. it should have separate button in taskbar, so user can switch to it by clicking on this button (also user can switch to this window by alt-tab).
To achieve such behavior I override method CreateParams, setting WndParent to 0:
type
TfrmSeparateForm = class(TForm)
protected
procedure CreateParams(var Params: TCreateParams); override;
end;
implementation
{$R *.DFM}
procedure TfrmSeparateForm.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.WndParent := 0;
end;
Everything works as I want except one little thing: when I try to bring this form to top, it stays above main form but behind the topmost one.. Please advise how to make this form appear above the topmost form. Thank you for help.
PS:
don't advise to make this form topmost.