Search code examples
delphiwinapitaskbarwindows-explorer

How to tell if Windows Taskbar's "autohide" is enabled?


How can I tell via a Delphi program if the Windows Explorer Taskbar is set to Autohide?


Solution

  • In Windows XP and higher, you can call SHAppBarMessage API with ABM_GETSTATE message.

    Syntax:

    SHAppBarMessage(ABM_SETSTATE, pabd);
    

    pabd is a pointer to APPBARDATA struct.
    header file is: shellapi.h.

    If you want to get state of taskbar, use ABM_GETSTATE message. you can call this api in delphi.