2005. február 18., péntek

How to minimize a secondary-form to the taskbar


Problem/Question/Abstract:

How to minimize a secondary-form to the taskbar        

Answer:

You can minimize a secondary-form to the taskbar using the following piece of code:

type
  TForm = class(TForm)
    ...
    private
    { Private declarations }
    procedure CreateParams(var Params: TCreateParams); override;
  end;

implementation

.....

procedure TForm.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  { Set the extended style for iconizing to the taskbar }
  { See CreateWindowEx }
  with Params do
    exStyle := exStyle or WS_EX_APPWINDOW;
end;

Nincsenek megjegyzések:

Megjegyzés küldése