Windows Taskbar Elevator

This program keeps the taskbar visible even when you're running an application in full-screen mode.

Before Elevating


After Elevating

Why would someone want to see the taskbar when an app is running full-screen?

I am the author of Windows Taskbar Masher so the reason for wanting such a thing was far from obvious to me. But I got a letter from the user of a security camera system: He wants to run multiple camera display windows in full-screen mode and use taskbar icons to switch between displays. The system has a touchscreen (no keyboard), so making the icons visible is essential.

Download

Windows Taskbar Elevator 1.0

Install

Unzip the archive and put the folder anywhere you like. A conventional choice would be:

C:\Program Files\WinTaskbarElevator\

Next, create a shortcut to the executable file:

WinTaskbarElevator.exe

Put the shortcut in the Start Menu/Startup folder so the program will run when Windows boots. To run the program immediately, simply double-click on WinTaskbarElevator.exe: You won't see anything. The program has no user interface.

Uninstall

If for some reason you need to stop the program, use the Task Manager:

Frequently asked questions

Q: Help! I can't get out of full-screen mode anymore.
A: The WinTaskbarElevator program checks every 2 seconds to see if a window covers the taskbar. If you click anywhere in the full-screen window, you'll have about two seconds to press <escape> or whatever else you need to do.

Q: Why don't you have a nifty taskbar icon to show when the program is running?
A: I don't like to see lots of taskbar icons. I associate them with machines infested with Value-Subtracted Software. Except when developing the program, I haven't found it necessary to stop WinTaskbarElevator. If you find a defect that makes this necessary, please write and let me know. Also (for now) I want to keep the program as simple as possible so others can understand and improve it. In the future, it might be more suitable to code it as a system service.

Q: I love Windows Taskbar Elevator! How can I make you rich and famous?
A: I prefer anonymity, but donations are appreciated!

Show me the source

You may, like me, not like the idea of downloading and running an .exe file from some unknown obscure website. Here's the source code so you can see it's safe. The follow section shows how you can built it yourself.

// WinTaskbarElevator.c - Keep the taskbar on top even in full screen mode.
// Version 1.0 Copyright 2021 by Hugh Sparks. Specific rights are granted
// by Apache License 2.0: http://www.opensource.org/licenses/Apache-2.0
// Documentation and updates: http://www.csparks.com/WinTaskbarElevator

#include 

#define INTERVAL 2000
#define CLASSNAME "Win7TaskbarElevator"
#define NOCHANGE 0,0,0,0,SWP_NOSIZE | SWP_NOMOVE

static HWND taskbar = NULL ;
static HWND desktop = NULL ;

static boolean isFullScreen(HWND window)
{	RECT a, b;
	GetWindowRect(window, &a);
	GetWindowRect(GetDesktopWindow(), &b);
	return (a.left   == b.left  &&
	        a.top    == b.top   &&
	        a.right  == b.right &&
	        a.bottom == b.bottom);
}

static VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime )
{	HWND fg = GetForegroundWindow() ;
	if (!taskbar)
		taskbar = FindWindow("Shell_TrayWnd", NULL) ;
	if (!desktop)
		desktop = GetShellWindow() ;
	if ((taskbar != fg) && (isFullScreen(fg)) && (fg != desktop)) {
		keybd_event(VK_LWIN, 0, 0, 0) ;
		keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0) ;
		keybd_event(VK_LWIN, 0, 0, 0) ;
		keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0) ;
	}
}

static void registerClass(HINSTANCE instance)
{	WNDCLASS class ;
	class.style = CS_HREDRAW | CS_VREDRAW ;
	class.lpfnWndProc = DefWindowProc ;
	class.cbClsExtra = 0 ;
	class.cbWndExtra = 0 ;
	class.hInstance = instance ;
	class.hIcon = NULL ;
	class.hCursor = NULL ;
	class.hbrBackground = NULL ;
	class.lpszMenuName = NULL ;
	class.lpszClassName= CLASSNAME ;
	RegisterClass(&class) ;
}

int APIENTRY WinMain(
	HINSTANCE hInstance,
	HINSTANCE hPrevInstance,
	LPTSTR lpCmdLine,
	int nCmdShow)
{	MSG msg ;
	HWND myWindow = FindWindow(CLASSNAME, NULL) ;
	if (myWindow) return 0;
	registerClass(hInstance) ;
	myWindow = CreateWindow(
		CLASSNAME, NULL, 0, 0, 0, 0, 0,
		NULL, NULL, hInstance, NULL
	) ;
	SetTimer(myWindow, 1, INTERVAL, timerProc) ;
	while (GetMessage(&msg, myWindow, 0, 0))
		DispatchMessage(&msg) ;
	return msg.wParam ;
}


How do I build the program?

The sources are included in the download. There are only three files: Win7TaskbarMasher.c, Masher.ico, and resources.rc which contains the copyright blurb and a reference to the icon.

If you actually want to work on the software, you'll probably prefer set it up in a development environment. If you just want to compile the program with no fuss, install Mingw and execute these commands:

	windres resources.rc -o resources.o
	gcc -mwindows WinTaskbarElevator.c resources.o -o WinTaskbarElevator.exe 

Complain or rejoice

If you have questions, comments or suggestions, please feel free to write.