Click here to Skip to main content
15,885,104 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
how can i disable the "windows+d" and "alt+f4" for my windows forms when they are running
i can only close them by the close buttons and minimiza buttons.
i dont want "windows+d" and "alt+f4" keys to handle my win forms.
if my forms is running and some1 press "windows+d" and "alt+f4" then this action will be set on
other application which is running in background and it will not affect on my forms!
any help?
Posted
Comments
Sergey Alexandrovich Kryukov 22-Feb-13 0:37am    
Why? why?!
—SA
syedaliaizazuddin 22-Feb-13 0:46am    
im making a winform as a widget. thatz why i dont want that some 1 press alt+f4 and my widget will close ..... hehehe!! simple
Abhishek Pant 22-Feb-13 0:56am    
this makes your app or widget somtimes annoying to users.I think its a abuse to users who will be using that app/widget.As every user wants easy and simple but not Annoying things.
syedaliaizazuddin 22-Feb-13 1:10am    
like widget they dont have a functionality of minimize ...........
syedaliaizazuddin 22-Feb-13 1:31am    
i have done almost .... the problem is when i pres win + d . it did not work for application , but it is dissabled for every application . i dont want that . i want that for only my application . and for others win + d should work

1 solution

Even though I never tried, I doubt that it can be done. What I know for sure, you cannot disable Ctrl + Alt + Delete, for a good reason (otherwise it would be possible to block the system), and I don't think you can do what you want.

But you should not try to do such thing, as it would be a greatest abuse. Think about your users.

You should always explain your ultimate goals when asking question. So, I don't know what are you trying to achieve and why, but I have one guess. Maybe what you need is so called "kiosk mode". Please take a look:
Running a Web Site in Kiosk Mode with C#[^],
c# program ctrl-alt-del screen windows 7[^].

—SA
 
Share this answer
 
Comments
syedaliaizazuddin 22-Feb-13 0:43am    
im making a winform as a widget. thatz why i dont want that some 1 press alt+f4 and my widget will close ..... hehehe!! simple
Sergey Alexandrovich Kryukov 22-Feb-13 0:55am    
Bad idea. I though it's something serious. Don't do it, your users would hate it, for a good reason.
—SA
syedaliaizazuddin 22-Feb-13 1:10am    
like widget they dont have a functionality of minimize ...........
syedaliaizazuddin 22-Feb-13 1:31am    
i have done almost .... the problem is when i pres win + d . it did not work for application , but it is dissabled for every application . i dont want that . i want that for only my application . and for others win + d should work

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900