Question

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

Was it helpful?

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.

OTHER TIPS

What is is that you really want to find out? Is it because you want to know the area of the screen that is useable?

If so, then I believe you can use the Screen.WorkAreaRect to determine the available screen area, where all (permanent) tool bars etc. are excluded.

Use Win32 shell apis (IsTBAutohide and others)
See Google Groups for undocumented apis.
Never read registry (ans stop removing right answers, it's stupid...)

U have to deal with windows registry because this information is keept in there. Value indicating "autoohide" is written(read) only while user logon /logout ont with his account

Registry key responsible for storing this information is located in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2 The only thing in there is settings and it is a 9th hex value for "autohide on" this value is 03 for "autohide off" it is 02

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top