Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to disable System HotKeys?

Status
Not open for further replies.

TheGreyBeast

Programmer
Apr 8, 2005
19
RO
I want to create a 3d program using OpenGL and Software rendering (gdi). The main problem are the system hotkeys, because I don't want the user to be able to minimize/activate startmenu/press ALT-TAB, etc..

I know, using DirectDraw, SetCooperativeLevel with DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN will solve the hotkey problem (not quite, really, CTRL-ALT-DEL is still working?!?)..

anyway, the point is I don't use DirectX.. I use OpenGL and (maybe) later I'll add support for a software rendering (even that one is using the gdi, not DirectDraw).

First, I tried SystemParametersInfo(SPI_SETSCREENSAVERRUNNING,0,&old,0); and it worked ok on Win95/Win98/WinMe, but it didn't work on WinNT/2000/XP... then I tried the RegisterHotKey(0,0,MOD_ALT,VK_TAB); to eliminate AT LEAST the ALT-TAB, and guess what? It worked ONLY on NT family (didn't work on Win9x/Me)... but this RegisterHotKey is not so good because it disables ONLY the ALT-TAB... anyone know of such a function, to disable all the system hotkeys in NT family, like the SystemParametersInfo(SPI_SETSCREENSAVERRUNNING...) does on Win9x? what is that SetCooperativeLevel doing so special anyway??

thanks in advance,
Grey Beast

There is something in each of us we don't know. Something with great power.
 
Ooops.. I made a mistake... it seems SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, 1, &old, 0); will disable hotkeys...

There is something in each of us we don't know. Something with great power.
 
This post is perfect. Took me a long time to find someone who knew what he was doing.

I'm running a kiosk type facility. I need to disable ALT-TAB combinations (for many reasons).

I am NOT a programmer of any sort. What I'd like to have, is 2 "files". 1 file, when I click it, will disable alt-tab combinations. The other file, when I click, will re-enable the combination.

Is there any such thing in existance? Or can someone write it for me?

Again, I'm NOT a programmer, so if you reply with 300 lines of code, I will have NO idea what to do with it.

I'm sorry for making my first post here so demanding, but I'm desperate.


Thanks to whomever in advance.

 
You can find yourself a local programmer that can you a simple little application that will go to the registry and change a single value of a key from 1 to 0.
The key in the registry is
Code:
HKEY_CURRENT_USER\Control Panel\Desktop\CoolSwitch

You need to alternate the values between 1 (enabled ALT-TAB) and 0 (disable ALT-TAB). As most changes in the registry, this will require a reboot between changes to take effect.

N.B. This works for most versions of windows.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Save this file as Enable Alt-tab.reg

Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"CoolSwitch"="1"

Save this one as Disable Atl-tab.reg

Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"CoolSwitch"="0"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top