Click to See Complete Forum and Search --> : Disabling Task Keys for NT ?
ramindu
Mar 11th, 2001, 08:05 PM
U no the 'Disabling the Task Keys' coding on the first page...... I wanted to do this for NT 4.0...
Well I'v posted this in 'General forum' & Lord Orwell ( a Hyperactive Member :-) told me that its not working for NT & he suggested that :
"if you were able to figure out how keyboard codepages were made, you could create one without function keys or a tab "
Any body with any Ideas on this or the original Question..? please
Thanks
susn
Mar 12th, 2001, 06:16 AM
You can disable Ctrl-Alt-Del on NT and 2K but this is very risky. It can prevent you from ever being able to log on again!
Be sure to enable Automatic Logon by specifying DefaultDomainName, DefaultUserName, DefaultPassword and AutoAdminLogin in the registry under Windows Login. Otherwise you will not be able to logon again. See Knowledge Base article Q114615 for details - there is a link on my links page. You may also want to read my disclaimer page.
After you set up automatic logon the logon dialog no longer appears at startup. You are then unable to logon as a different user until the automatic logon and below code is disabled in the registry. You may be able to temporarily bypass the automatic logon by holding down the Shift key as windows is starting
This code was donated by Paul Johnston.
Public Sub SetupScancodeMap()
Dim bArray(1 To 48) As Byte
On Error Resume Next
If g_bDebugMode = True Then Exit Sub
'
' Setup the keyboard scancode mapping to disable the Windows keys
' and Context menu keys
'
bArray(1) = &H0
bArray(2) = &H0
bArray(3) = &H0
bArray(4) = &H0
bArray(5) = &H0
bArray(6) = &H0
bArray(7) = &H0
bArray(8) = &H0
'
' Number of keys
'
bArray(9) = &H6
bArray(10) = &H0
bArray(11) = &H0
bArray(12) = &H0
'
' Windows key
'
bArray(13) = &H0
bArray(14) = &H0
bArray(15) = &H5B
bArray(16) = &HE0
'
' Windows key
'
bArray(17) = &H0
bArray(18) = &H0
bArray(19) = &H5C
bArray(20) = &HE0
'
' Windows menu key
'
bArray(21) = &H0
bArray(22) = &H0
bArray(23) = &H5D
bArray(24) = &HE0
'
' F10 key
'
bArray(25) = &H0
bArray(26) = &H0
bArray(27) = &H44
bArray(28) = &H0
'
' Left Ctrl-key
'
bArray(29) = &H0
bArray(30) = &H0
bArray(31) = &H1D
bArray(32) = &H0
'
' Left Alt-key
'
bArray(33) = &H0
bArray(34) = &H0
bArray(35) = &H38
bArray(36) = &H0
'
' Right Ctrl-key
'
bArray(37) = &H0
bArray(38) = &H0
bArray(39) = &H1D
bArray(40) = &HE0
'
' Right Alt-key
'
bArray(41) = &H0
bArray(42) = &H0
bArray(43) = &H38
bArray(44) = &HE0
'
' Null terminator
'
bArray(45) = &H0
bArray(46) = &H0
bArray(47) = &H0
bArray(48) = &H0
'
' Set the new registry value, does not take effect until the next reboot.
' You can use my registry module or your own routine to write the value to the registry.
'
Reg_SetKeyValue HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Keyboard
Layout", "Scancode Map", bArray, REG_BINARY
End Sub
If you use this code, please mention "www.TheScarms.com"
Unfortunately this will only take effect after rebooting ...
Note that this will be take effect Systemwide NOT only for Runtime!
ramindu
Mar 12th, 2001, 08:49 AM
Thanks But after reading yr reply I thought I'd rather not do it But Thanks V. Much Any ways.....
Thanks Again
Rgds
Ramindu
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.