A customer sent the following question with the rather unhelpful subject line Need Help. They’re not just looking for help; they’re looking for Help with a capital H.
We want to make something like an appbar, but without some of the limitations of appbars. For example, like an appbar, we want applications to avoid using the edge of the screen. The section of the screen the window appears on should be “mine”; nobody else should be permitted to use it. The window should always be on top; nothing should be able to cover it. For example, Internet Explorer in fullscreen (F11) mode should not cover our window; it should go behind.
In other words, you want to create a window that is never covered by any other windows, not even other topmost windows. There are two groups fighting over the same thing. One of them will lose. That loser is you.
Everquest/PowerPoint/Picasa/etc team: “I want to cover the screen.”
You: “I want to prevent programs from covering the screen.”
Everquest/PowerPoint/Picasa/etc team: “I want to cover the screen, even if there is a program that wants to prevent me from covering the screen.”
You: “I want to prevent programs from covering the screen, even if there is a program that is overriding my attempt to prevent them from covering the screen.”
Everquest/PowerPoint/Picasa/etc team: “I want to cover the screen, even if there is a program that wants to prevent me from overriding their attempt to prevent me from covering the whole screen.”
You: “Infinity!”
Everquest/PowerPoint/Picasa/etc team: “Infinity plus one!”
Creating an appbar says, “If you want to maximize your window, use the part of the screen that I’m not using.” But if a program creates a window of size SM_CXVIRTUALSCREEN
by SM_CYVIRTUALSCREEN
, then it has done it and what are you going to do? You can’t prevent them from doing it, but you can make your wishes known and respond intelligently when they choose to ignore you.
You can build a sign that says “no trespassing” but that doesn’t prevent people from trespassing. If somebody walks onto your property right past your “no trespassing” sign, then they have done it and now you have to decide what action you’re going to take in response.
0 comments