|
-
Jun 28th, 2005, 04:15 PM
#1
Thread Starter
Fanatic Member
Disable Windows Buttons?
Is it possible to disable the windows buttons on the keyboard other than modifying the registry?
-
Jun 28th, 2005, 04:25 PM
#2
Re: Disable Windows Buttons?
You could set up a System Wide Hotkey which activates your program, then use RaiseEvent to raise the KeyUp event of your application, and set KeyCode to 0, something similar to this pseudo-code:
VB Code:
SetSystemWideKey(WINDOWS_KEY)
CallBack Sub HotKey_Pressed()
RaiseEvent Form_KeyUp
End Sub
Sub Form_KeyUp(arguments)
KeyCode = 0
End Sub
Not too sure if it would work, but its worth a shot. Other than that, I'd say the registry would be your best bet.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jun 28th, 2005, 04:39 PM
#3
Thread Starter
Fanatic Member
Re: Disable Windows Buttons?
Can you give me a little more detail? Is that all of the code?
-
Jun 28th, 2005, 04:40 PM
#4
Re: Disable Windows Buttons?
No no, Pseudo-code, means its a basic layout, not the actual code. You will have to look up how to set Global HotKeys (System Wide Hotkeys). Try searching the forums using the Forum Search area. I'm not even sure this would work. Have you tried Google?
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jun 28th, 2005, 04:47 PM
#5
Thread Starter
Fanatic Member
Re: Disable Windows Buttons?
Is it possible to use the registry codes without having to restart for changes to take effect? Because here are the codes I have:
Disable the Windows Key: (Windows NT/2000/XP)
VB Code:
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
ThePath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map"
WSHShell.regwrite ThePath, 00 00 00 00 00 00 00 00 03 00 00 00 00 00 5B E0 00 00 5C E0 00 00 00 00, "REG_BINARY"
Disable the Windows HotKeys: (All Windows)
VB Code:
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
ThePath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWinKeys"
WSHShell.regwrite ThePath, 1, " REG_DWORD"
I would use this, but I hate how you have to restart for changes to take effect.
-
Jun 28th, 2005, 04:55 PM
#6
Re: Disable Windows Buttons?
There is no other way I know of. Perhaps searching google will return more results.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|