Franky
If you want to have a separate taskbar button for each secondary window
you have two options:
1. override the CreateParams method of each secondary form and add the
WS_EX_APPWINDOW style:
procedure TForm2.CreateParams(Var params: TCreateParams);
begin
inherited CreateParams( params );
params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
end;
If you click on a secondary forms taskbar button while another app is
active this will still bring all the applications forms to front. If you
do not want that there is option
2. 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;
Note that this can cause some problems with modal forms shown from
secondary forms. If the user switches away from the app while a modal
form is up and then back to the form that showed it the modal form may
hide beneath the form. It is possible to deal with this by making sure
the modal form is parented to the form that showed it (using
params.WndParent as above) but this is not possible with the standard
dialogs from the Dialogs unit and exceptions, which need more effort to
get them to work right (basically handling Application.OnActivate,
looking for modal forms parented to Application via GetLastActivepopup
and bringing them to the top of the Z-order via SetWindowPos).
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Sent using Virtual Access 5.00 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe
procedure TForm2.CreateParams(Var params: TCreateParams);
begin
inherited CreateParams( params );
If (NOT (csDesigning in ComponentState)) then begin
params.ExStyle := params.ExStyle or WS_EX_APPWINDOW;
end;
Regards,
Glynn
Peter Below (TeamB) <10011...@compuXXserve.com> wrote in message
news:VA.0000457...@antispam.compuserve.com...