I have created windows application. When i Run this application, i want to make the user should not able to access other then my application in their system. So can any one suggest me how to block the accessing of desktop/other applications other than my applications using c sharp coding.
Asked
Active
Viewed 395 times
0
-
1Maybe look at http://stackoverflow.com/questions/17152113/suggestions-for-setting-up-a-kiosk-mode-in-windows-7. – JimmyB Jul 30 '13 at 09:25
-
http://stackoverflow.com/questions/278237/keep-window-on-top-and-steal-focus-in-winforms – rags Jul 30 '13 at 09:27
2 Answers
0
You can make you window bordeless and full screen, then hide the task bar, but it wouldn't stop people switching to other applications using the keyboard.
I'm not sure you would be able to "lock down" Windows to only run your application, and why would you, it's designed to run multiple applications so to some extent you are fighting the tide.

Tony
- 9,672
- 3
- 47
- 75
-
Hi Tony, Thanks for your Reply. I will try this one what ever you suggested. – Mohan Gopi Jul 30 '13 at 10:37
0
You can kill the explorer with Process.Kill
foreach (Process proc in Process.GetProcessesByName("explorer"))
{
proc.Kill();
}
And launch explorer.exe into the destructor of your application

TheMightyX2Y
- 1,473
- 1
- 16
- 24
-
Hi Oh_my_Geo, Thanks for your Reply. I do't want to kill any process which is running, just i want to make the user can access only that(currently running) application rest of the things he cannot access like Task bar, desktop Icons, etc.. what ever is their in system. After i close my application make he can access all the things. – Mohan Gopi Jul 30 '13 at 09:50
-
All the things will reapper if you restart explorer (not window(s)). May I know why you don't want to kill explorer ? Because you'll not have the shortcuts, the taskbar, only your application. If you don't want to kill process you can launch your application in full screen (like Tony said) but you still have all the shortcuts. You can use a hook to disable the shortcuts but it's very loud, I don't suggest to you to do this. To disable taskbar you need PInvoke : http://social.msdn.microsoft.com/Forums/vstudio/en-US/e231f5be-5233-4eee-b142-7aef50f37287/disabling-andor-hiding-windows-taskbar – TheMightyX2Y Jul 30 '13 at 10:08
-
Hi Oh_my_Geo, Thanks for your Reply. I will try this one what ever you suggested. – Mohan Gopi Jul 30 '13 at 10:37