Categories
Delphi

Show / Hide a Forms icon and caption in the Taskbar

It is possible to hide the applications mainform from the taskbar or put other forms in your application on the task bar by simply changing the create params as the form is constructed.
Override the Form’s CreateParams and add one of the following to either remove or add to the taskbar
to Show in the taskbar

procedure TForm.CreateParams(var Params: TCreateParams);
begin
  ExStyle := ExStyle or WS_EX_APPWINDOW;
end;

to remove from the taskbar

procedure TForm.CreateParams(var Params: TCreateParams);
begin
  ExStyle := ExStyle and not  WS_EX_APPWINDOW;
end;