Mega Code Archive

 
Categories / Delphi / System
 

Hide the app from the taskbar

Title: Hide the app from the taskbar Question: Have you ever needed to create an application that wasn't visible in the taskbar? Answer: To hide the task bar entry: procedure TMainForm.FormShow(Sender: TObject); var Owner : HWnd; begin Owner:=GetWindow(Handle,GW_OWNER); ShowWindow(Owner,SW_HIDE); end; To prevent the taskbar to show up again after minimizing the application: {MainForm: interface} procedure WMSysCommand(var Message: TWMSysCommand); message WM_SysCommand; procedure TMainForm.WMSysCommand(var Message: TWMSysCommand); begin if Message.CmdType and $FFF0 = SC_MINIMIZE then Hide else inherited; end;