[.net] .net full screen non-switchable application
i want to automatically start my app when windows starts(in fullscreen mode)and then prevent the user from switching to another application.(neither Alt+tab nor windows key will switch to another applicaition) How can i do this in c#
i'm usually not the kind to assume by default that questions are aimed at a bad use but seeing how this is worded.... why do you need to do that?
I have to do this because my boss said so..I won't do any harm to anyone's system.But the program i will write must be topmost(it is now) but also non-switchable(it is not now).How can i get support for this from OS in .net
Quote:Original post by tonymontana
I have to do this because my boss said so..
Your boss is an idiot. Feel free to tell him I said so. [grin]
There's no justifiable reason to implement such functionality in a business application and even games shouldn't do this as it's almost trivial to handle app switching.
There is one reasonable reason why anyone wants this:
For some sort of Kiosk Application. But even there, allowing desktop access, and then using group policy to restrict everything is the more solid solution. Thats the way I've done before and doing right now again.
For some sort of Kiosk Application. But even there, allowing desktop access, and then using group policy to restrict everything is the more solid solution. Thats the way I've done before and doing right now again.
The answer you're looking for is somewhere between "You don't." and "You can't."
While you can (I believe) catch Alt+Tab on all current versions of Windows, it's not recommended. ("You don't.")
Users can also switch tasks with Ctrl+Alt+Del, and you can't catch that, because it throws a hardware interrupt that is only available to programs running in ring 0. ("You can't.")
While you can (I believe) catch Alt+Tab on all current versions of Windows, it's not recommended. ("You don't.")
Users can also switch tasks with Ctrl+Alt+Del, and you can't catch that, because it throws a hardware interrupt that is only available to programs running in ring 0. ("You can't.")
Like others here, I think disabling input like that is a bad idea. What if they press Ctrl+Shift+Esc to start Task Manager then kill your app? What if they press Ctrl+Alt+Del to reach the lock screen and start Task Manager that way?
davepermen's solution seems best, but if you can't convince your boss otherwise, see this article on setting up a windows hook. Specifically you'll want a keyboard hook that eats Alt+Tab, Windows key, Ctrl+Shift+Esc, etc. Note that you can't eat Ctrl+Alt+Del; that combo is detected only by the OS.
davepermen's solution seems best, but if you can't convince your boss otherwise, see this article on setting up a windows hook. Specifically you'll want a keyboard hook that eats Alt+Tab, Windows key, Ctrl+Shift+Esc, etc. Note that you can't eat Ctrl+Alt+Del; that combo is detected only by the OS.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement