Delphi source code:

Hide Windows TaskBar


Windows' taskbar is just a window, like any other window. You can hide or show it with the function ShowWindow, given its handle. And you can get the handle of the taskbar with the function FindWindow.

By cleverly combining these two functions, you can hide Windows' taskbar from within your Delphi program with only 1 line of code:

procedure TForm1.Button1Click((Sender: TObject);
begin
  ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_HIDE);
end;

To show the taskbar again, use ShowWindow with another parameter:

procedure TForm1.SetEditsColor(NewColor: TColor);
begin
  ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_SHOW);
end;

Related articles:

Hide application from Taskbar
How to hide a program's "button" from the TaskBar.

Crash Course Delphi Become member of the DelphiLand Club and get our Crash Course Delphi, plus the fully commented source code of numerous projects, plus guaranteed answers from our Q/A Forum. Membership is for life!

TOP   DelphiLand Club Membership  DC Library  Forum  Forum Archives
 Crash Course Delphi  Tips  Source Code  Downloads  Links

© Copyright 1999-2016 
Studiebureau Festraets