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;

DelphiLand Club Membership  DC Library  FAQ
 Crash Course Delphi  Tips  Source Code  Downloads  Links

© Copyright 1999-2017 
DelphiLand