Basically I want to make simple toggle program (that will be mapped to some keyboard shortcut) that set taskbar to auto-hide mode if in normal mode (and conversely, to normal sh
For all those who arrived here from Google and are using Windows 10, like me, the answers from @Quispie and @nicruo are OK but need an extra if
.
The reason for that is the class name differs from version to version (apparently, as I no longer have any other Windows but 10).
msgData.hWnd = FindWindow("System_TrayWnd", null);
if (msgData.hWnd == IntPtr.Zero)
msgData.hWnd = FindWindow("Shell_TrayWnd", null);