I have an EeePC 701 (i.e. 4G). On its really small display every pixel is precious. Therefore I set the task bar to auto hide. It is really not hard to let the mouse fall down to the bottom of the screen in order to show the task bar. But, than again, I often connect to my Eee through the remote desktop, and if I do not choose full screen, it is not at all that easy any more to hit the bottom of its desktop. So I turn auto hide off again. It means every time: Make the task bar show, right click, properties... Annoying. I decided to make and end to it and searched for a solution. A few lines of code, and there it was. It toggles the autohide setting for the windows taskbar. The binary is here for download. I tried it on Windows XP and Windows 7 beta.

[download]

You can make a shortcut to it and put it on your desktop. If you like to use the keyboard, you can assign a hotkey in shortcuts properties. Since I like to use the Windows key for my hotkeys, I rather use AutoHotkey.

The code that does the toggling (windows.h must be included):

	APPBARDATA abd;
	//both ABM_GETSTATE and ABM_SETSTATE require .cbSize to be set
	abd.cbSize = sizeof(APPBARDATA);
	//get state
	abd.lParam = (UINT) SHAppBarMessage(ABM_GETSTATE, &abd);
	//toggle auto hide state
	abd.lParam ^= ABS_AUTOHIDE;
	//ABM_SETSTATE requires .hWnd to be set
	abd.hWnd = FindWindow(_T("Shell_TrayWnd"), NULL);
	//set state
	SHAppBarMessage(ABM_SETSTATE, &abd);
		

Command line options:

/on ... switches on the auto hide state
/off ... switches off the auto hide state
If both are specified, "/on" wins. If none are specified, toggles the auto hide state.