I need to hide a Windows form from the taskbar but I can\'t use WS_EX_TOOLWINDOW
because I need the system menu and min/max buttons on the form\'s title bar. >
With thanks to http://www.scalabium.com/faq/dct0096.htm.
procedure TForm1.FormCreate(Sender: TObject);
begin
ShowWindow(Application.Handle, SW_HIDE);
SetWindowLong(Application.Handle, GWL_EXSTYLE,
GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW);
ShowWindow(Application.Handle, SW_SHOW);
end;
I tested it and it worked with Delphi2006. And windows menu and min/max buttons are still visible.