Apps modify monitor work area
I wrote this quick program to hide the taskbar with a hard-coded hotkey binding (I just needed it to work.. I actually use a binding that would never actually be pressed and use an extra mouse button to trigger it). Basically, hitting the hotkey will toggle the taskbar between being hidden or visible, and when the program first starts it changes the working area (the area of the monitor that programs can use) to take up the full screen, rather than lose the 30 pixels that the taskbar takes up.
This worked fine until I noticed that every so often, the work area would revert to the default. It took me a little bit to figure it out, but it turns out that some apps or actions mess with the work area (the only one I've narrowed down is when you enable/disable a second monitor - there are others, but I've always noticed too late to pinpoint them). My first idea was to just add a timer that resets the work area at a regular interval, but that's just a quick-fix hack that I wouldn't be too happy with. It also occurred to me that there might be some way to detect a work area change, but that's out of the question because in practice, it would mean that my work area (and thus my open programs) resize, and then my toggler intercepts and resets it, and the programs end up staying shrunk until I resize them; this is far too noticeable. Does anyone have any ideas? I wrote the program in C# using P/Invoke to get access to the hotkey binders and other stuff.
It's worth pointing out that while I was using Litestep, the taskbar wasn't running at all (Litestep is an explorer shell replacement). This meant that I had full screen real estate at all times, and since the taskbar wasn't running programs didn't resize the work area to adjust for it. So if there's some way to hide the fact that the taskbar is running, I think that would be an ideal solution. But I don't think there's any way to do that.
Anyway, I'd really appreciate any input. I can upload the source code if need be. Thanks in advance!
Edit: I just noticed that Windows Live Messenger resets the work area when it exits. Bloody annoying!