hi all,
i obtained the code to disable alt+ctrl+delete ,alt+tab and ctrl+esc but, i didn't find a code to disable windows button ( the button is next to left alt button in ur keyboard )
Printable View
hi all,
i obtained the code to disable alt+ctrl+delete ,alt+tab and ctrl+esc but, i didn't find a code to disable windows button ( the button is next to left alt button in ur keyboard )
Code:Dim h1, h2 As Long
h1 = FindWindow("Shell_trayWnd", vbNullString)
h2 = FindWindowEx(h1, 0, "Button", vbNullString)
EnableWindow h2, 1
This will only disable the button on the screen to disable the keyboard button you can set a system hook monitoring keypresses.
thanx for ur interesting but it didn't work
i can hide the start button so the user can't click it, but still he can press the windows button in his keyboard
i wanna to disable just the press (like alt+ctrl+delete)
any other suggestions??
Vlatko
you posted
Dim h1, h2 As Long
that does not mean that h1 is a long variable type right?
Don't know about your computer, but for mine, this code disables ctrl+alt+del ctrl+esc alt+tab and the windows key.
Code:Private Declare Function SystemParametersInfo Lib _
"user32" Alias "SystemParametersInfoA" (ByVal uAction _
As Long, ByVal uParam As Long, ByVal lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
'disable:
Call DisableCtrlAltDelete(True)
'enable:
Call DisableCtrlAltDelete(False)
you might want to take a look at Jop's code.
http://forums.vb-world.net/showthrea...threadid=40315