Mega Code Archive

 
Categories / Delphi / API
 

Hiding the windows taskbar

Question: How do I hide the Windows Task Bar? Answer: First call the Windows API function FindWindow() to retrieve the handle to the TaskBar Window, then call the Windows API function ShowWindow() passing the predefined constant SW_HIDE. Example: procedure TForm1.Button1Click(Sender: TObject); var hTaskBar : THandle; begin hTaskbar := FindWindow('Shell_TrayWnd', Nil); ShowWindow(hTaskBar, SW_HIDE); end; procedure TForm1.Button2Click(Sender: TObject); var hTaskBar : THandle; begin hTaskbar := FindWindow('Shell_TrayWnd', Nil); ShowWindow(hTaskBar, SW_SHOWNORMAL); end;