Sign in to follow this  
tonymontana

[.net] .net full screen non-switchable application

Recommended Posts

tonymontana    100
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#

Share this post


Link to post
Share on other sites
ranakor    439
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?

Share this post


Link to post
Share on other sites
tonymontana    100
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

Share this post


Link to post
Share on other sites
Machaira    1033
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.

Share this post


Link to post
Share on other sites
davepermen    1047
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.

Share this post


Link to post
Share on other sites
alun    100
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.")

Share this post


Link to post
Share on other sites
mutex    1111
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this