|
-
Aug 26th, 2000, 07:12 PM
#1
Thread Starter
Lively Member
How can i disable the user from pressing Ctrl Alt Del? I want the only way to exit my program is by using by program to exit.
-
Aug 26th, 2000, 07:32 PM
#2
This will either enable or disable Ctrl-Alt-Del from being used.
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
Usage:
'Disable
Call DisableCtrlAltDelete(True)
'Enable
Call DisableCtrlAltDelete(False)
-
Aug 26th, 2000, 07:52 PM
#3
Thread Starter
Lively Member
That worked great thanks.
-
Aug 27th, 2000, 03:37 AM
#4
New Member
Remove program from takslist
You might just want to remove your program from the tasklist. This way, they can still use CTRL+ALT+DEL for another program that freezes and your program won't be on the list.
Module:
Code:
Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0
Form:
Code:
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
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
|