Danmilkman Posted November 29, 2003 Posted November 29, 2003 Hai, is it possible to disable ALT-F4 so my application won't shut down by unauthorised users? And if so, how? Quote Intellectuals solve problems, geniuses prevent them!
Leaders Iceplug Posted November 29, 2003 Leaders Posted November 29, 2003 So, how is the application shut down by authorized users? Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Danmilkman Posted November 30, 2003 Author Posted November 30, 2003 Hi Iceplug, Authorized users can login with a admin code. A new button appears that can shut down the system. Unauthorized users (let's say guests) must not be able to shut the program down. Any Ideas? Thnx. Quote Intellectuals solve problems, geniuses prevent them!
Leaders Banjo Posted November 30, 2003 Leaders Posted November 30, 2003 Firstly, you can not prevent your app from being closed purely in your code. You can disable the close option on the window menu (and the close button in the control box along with it) but the user will always be able to kill your program using the task manager. The only way to prevent this is to use Window user security to deny the users access to the task manager. Quote Those who live by the sword get shot by those who don't!
Danmilkman Posted December 1, 2003 Author Posted December 1, 2003 Indeed, taskmanager can be disabled by a registryhack. However e.cancel=true on the closing event prevents closing the app. I have disabled the keyboard with a selfmade Keyboard Hook. This can disable all keys, except CTRL+ALT+DELETE. This I do through the registry. Works fine. :D Quote Intellectuals solve problems, geniuses prevent them!
Leaders Banjo Posted December 1, 2003 Leaders Posted December 1, 2003 You can prevent an app from being closed but not from being terminated. There is a difference. Quote Those who live by the sword get shot by those who don't!
Danmilkman Posted December 2, 2003 Author Posted December 2, 2003 agreed Quote Intellectuals solve problems, geniuses prevent them!
m7j4p7 Posted December 12, 2003 Posted December 12, 2003 Hi, My problem is similar, but... I have a windows service which runs a program. I want the windows service to be able to close this (Process.CloseMainWindow()) but not the user to. So basically, can I have e.cancel = false so that the service can close it, but so that the user can't Alt+F4 it? Mike Quote :) Mike :) He who has a secret, must keep it secret he has a secret to keep......
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.