Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How to disable specific keys ? (http://www.go4expert.com/forums/disable-specific-keys-t19350/)

SaswatPadhi 8Sep2009 19:25

How to disable specific keys ?
 
Hi all members :)

I want to disable some specific keys (like F2, F5) / key-sets (like CTRL+ALT+DEL, CTRL+ESC), while user is running my program (if I want the user to be unable to abnormally terminate the program through Task Manager or other process terminators .. :devil:).

Any ideas, how I can implement that in my C++ code ?

Thanx in advance :)

shabbir 9Sep2009 09:22

Re: How to disable specific keys ?
 
You cannot do that actually because you do not get the message before windows and they relay the event to your program

SaswatPadhi 9Sep2009 12:03

Re: How to disable specific keys ?
 
But I have seen some games, where you cannot escape from the game by pressing CTRL+ALT+DEL or CTRL+ESC. :confused:

And, I have seen "many" VB codes with that feature.

naimish 9Sep2009 12:46

Re: How to disable specific keys ?
 
in VB that is possible, I was going to post about this, but again Shabbir will give infraction mentioning out of topic reply.

In VB, it's possible to achiieve the same.

xpi0t0s 9Sep2009 13:12

Re: How to disable specific keys ?
 
If it's possible in VB then it'll be possible in C++ as well.
How would you do it in VB; that might indicate how it can be done in C++.

naimish 9Sep2009 14:04

Re: How to disable specific keys ?
 
Making use of Key Value ;)

shabbir 9Sep2009 14:42

Re: How to disable specific keys ?
 
The way the game do it very low level programming may be but I would love to see if its possible to block CAD

SaswatPadhi 9Sep2009 17:57

Re: How to disable specific keys ?
 
OK Guys, I found the solution here :: http://www.codeproject.com/KB/winsdk...ioWinLock.aspx
( although the methods for disabling CAD are not very simple and system-friendly :p )


All times are GMT +5.5. The time now is 09:45.