×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to disable System HotKeys?

How to disable System HotKeys?

How to disable System HotKeys?

(OP)
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.

RE: How to disable System HotKeys?

(OP)
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.

RE: How to disable System HotKeys?

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.

RE: How to disable System HotKeys?

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)

RE: How to disable System HotKeys?

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"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close