| | | Forum Guru
       
Group: Forum Members Last Login: 10/21/2008 5:38:50 AM Posts: 199, Visits: 131 |
| Hi All, How can we disable ATL+CTRL+DEL, CTRL+ESC key in VB. I can be done in win9x but can't done in win2k/xp/2003.  Anybody have it's right answer ?:p ++skc++
____________Sunil KC http://www.sunil.com.np |
| | | | 
Forum God
       
Group: Forum Members Last Login: 2/1/2007 4:31:22 AM Posts: 656, Visits: 13 |
| IMHO there is no permissable reason for disabling ctrl+alt+del. could you expand on what your app is doing. James

 |
| | | | 
Forum God
       
Group: Forum Members Last Login: 1/12/2006 7:37:05 AM Posts: 712, Visits: 6 |
| this was originally posted by capta on the old forums, so don't credit me for it ...
http://www.codeguru.com/vb/comments/1669.shtml
no idea if it works or not though.
|
| | | | Forum Newbie
       
Group: Forum Members Last Login: 1/21/2005 6:11:00 AM Posts: 3, Visits: 1 |
| | | | | Forum God
       
Group: Forum Members Last Login: 3/13/2006 2:34:13 AM Posts: 794, Visits: 338 |
| There are alot of reasons to secure a workstation or home computer. No need to post them all. Security is number 1 reason IMO.
There are only a couple ways to do in vb6.
www.thescarms.com has example code for nt/w2k (writes to registry an array...) replace taskmgr.exe with your own program (use a Niether example is really , and you would do better to use one of the following acceptable ways. (which requires use of different pl)
write a GINA stub write a keyboard driver
This taken from .Net 247 and written by:
HuangTM Microsoft Online Partner Support MCSE/MCSD
|
| | | | 
Forum God
       
Group: Forum Members Last Login: 9/1/2006 11:25:31 AM Posts: 827, Visits: 132 |
| | | | | Forum God
       
Group: Forum Members Last Login: 3/13/2006 2:34:13 AM Posts: 794, Visits: 338 |
| why not explain as an A1Tutorial, how to find a certain window's caption, hint hint 
|
| | | | 
Forum God
       
Group: Forum Members Last Login: 1/12/2006 7:37:05 AM Posts: 712, Visits: 6 |
| booooze, are you refering to the...
app.title = ""
...trick? not sure if that works on nt platforms if you are 
|
| | | | Forum Newbie
       
Group: Forum Members Last Login: 9/19/2008 3:50:53 PM Posts: 1, Visits: 4 |
| Here is the code to enable and disable "Alt+ctrl+del" keys on windows XP
Cheers.....
Option Explicit
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright ©2007-2008 The Viper ...www.singingvipers.com , All Rights Reserved.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This code explains how to disable and enable the Task
' Manager in Windows XP.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' For any queries,suggestions and bug reports feel free
' to contact me at viperdr@yahoo.com
'***********************************************************************
' CONSTANTS
'***********************************************************************
Private Const KEY_ALL_ACCESS = &H2003F
Private Const HKEY_CURRENT_USER = -2147483647
Private Const ENABLE_TASKMGR = 0
Private Const DISABLE_TASKMGR = 1
'***********************************************************************
' Windows API Declarations for Registry Functions
'***********************************************************************
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" ( _
ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, _
ByVal samDesired As Long, ByRef phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" ( _
ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, _
ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
' SETS THE VALUE IN THE REGISTRY
Private Sub SetKeyDataValue(KeyValueData As Integer)
Dim OpenKey As Long, SetValue As Long, hKey As Long
OpenKey = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", 0, KEY_ALL_ACCESS, hKey)
SetValue = RegSetValueEx(hKey, "DisableTaskMgr", 0&, 4, CLng(KeyValueData), 4)
SetValue = RegCloseKey(hKey)
End Sub
Put two command buttons one to enable and other to disable :
'....To disable
Private Sub cmddisable_Click()
Dim retval As Byte
Call SetKeyDataValue(DISABLE_TASKMGR)
retval = MsgBox("Task Manager is now Disabled.", vbInformation, "TASK MANAGER DISABLED !!! -Sanchit Karve")
End Sub
'....To Enable
Private Sub cmdenable_Click()
Dim retval As Byte
Call SetKeyDataValue(ENABLE_TASKMGR)
retval = MsgBox("Task Manager is now Enabled.", vbInformation, "TASK MANAGER ENABLED !!! -Sanchit Karve")
End Sub
This should work perfectly !!!
Regards
TheViper |
| |
|
|