Mega Code Archive

 
Categories / Delphi / Examples
 

Does the taskbar automatically hide

To determine the size of the available screen estate in Delphi 3 or earlier, you need to know whether the taskbar is visible or not. Here's a simple function to check for this: //------------------------------------------ // Returns TRUE if taskbar auto hide is on. // // if IsTaskBarautoHideOn then // begin // .. auto hide is ON .. // end; //------------------------------------------ function IsTaskbarAutoHideOn : Boolean; var ABData : TAppBarData; begin ABData.cbSize := SizeOf (ABData); result := (SHAppBarMessage (ABM_GETSTATE, ABData) and ABS_AUTOHIDE) > 0 end;