Sadam
asked on
Simple one... you think? - for the experts.
I kinda asked this before, but now I really need the answer.
I need some source, small and simple, in Visual C or Delphi, that runs on Windows 2000, that disables the Windows key.
Thanks in advance.
I need some source, small and simple, in Visual C or Delphi, that runs on Windows 2000, that disables the Windows key.
Thanks in advance.
ASKER
I started out that way.
First of all you use WH_KEYBOARD_LL and not WH_KEYBOARD.
Didn't work out too well though.
I managed to hook the Windows key and stop windows from seeing it, but the key doesn't release. Therefor any key I press after that becomes a combination of the Windows key and that new key.
This must be the right way to do it, but I need some help... some source.
-out.
First of all you use WH_KEYBOARD_LL and not WH_KEYBOARD.
Didn't work out too well though.
I managed to hook the Windows key and stop windows from seeing it, but the key doesn't release. Therefor any key I press after that becomes a combination of the Windows key and that new key.
This must be the right way to do it, but I need some help... some source.
-out.
A quick&dirty solution would be
char c;
// disable key
SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 1, (void*) &c, 0);
char c;
// enable key
SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 0, (void*) &c, 0);
(haven't tried it on Win2k)
char c;
// disable key
SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 1, (void*) &c, 0);
char c;
// enable key
SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 0, (void*) &c, 0);
(haven't tried it on Win2k)
ASKER
jkr.
In my opinion it should be the sollution, but MS removed it in windows 2000.
My guess is, to keep a stable OS.
Now any key pressed on a screen saver just returns you to the login screen.
So... Unfortunately it doesn't work on 2000.
-out.
In my opinion it should be the sollution, but MS removed it in windows 2000.
My guess is, to keep a stable OS.
Now any key pressed on a screen saver just returns you to the login screen.
So... Unfortunately it doesn't work on 2000.
-out.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry I only comment now.
I've been very busy lately...
I tried a quick test this morning on the PreTranslateMessage, but can't get it to work.
Could you send me some source please.
Just a Hello World.
Thanks.
-out.
I've been very busy lately...
I tried a quick test this morning on the PreTranslateMessage, but can't get it to work.
Could you send me some source please.
Just a Hello World.
Thanks.
-out.
ASKER
Waseemanis...
You got some code for me please???
I need it urgently.
-out.
You got some code for me please???
I need it urgently.
-out.
hook the keyboard using SetWindowsHookEx(WH_KEYBOA
and scan for the keycode for the windows-key ?