|
-
Feb 7th, 2000, 10:51 PM
#1
Thread Starter
Hyperactive Member
I have an application that should not be closed by pressing CTRL+ALT+DEL or in other words "End task". It is a standard EXE only.
Please reply.
Thanx,
Jebs.
-
Feb 8th, 2000, 12:02 PM
#2
Addicted Member
Win32 provides no direct method for disabling task-switching functions.
They are, however, disabled whenever the screen saver is active in order to
provide for password-protected savers. This can be exploited under Windows
95 by using API calls to declare the current application to be an active
screen saver. The actual screen saver will not start while this is in
effect. This also does not function under Windows NT.
Private Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" (ByVal uAction As Long, _
ByVal uParam As Long, lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Private Const SPI_SCREENSAVERRUNNING = 97
Private Sub cmdDisable_Click()
SystemParametersInfo SPI_SCREENSAVERRUNNING, True, ByVal 1&, 0
End Sub
Private Sub cmdEnable_Click()
SystemParametersInfo SPI_SCREENSAVERRUNNING, False, ByVal 1&, 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
' re-enable Ctrl+Alt+Del and Alt+Tab before the program terminates!
cmdEnable_Click
End Sub
'*************************************
-
Feb 8th, 2000, 04:16 PM
#3
Conquistador
just search vb-world for disable,
that's how i found it

------------------
david
Teenage Programmer
-
Feb 8th, 2000, 05:09 PM
#4
why you don't register you're programm as service ??? (then it i hiden on the CTRL+ALT+DEL Tasklist)
here the code: (works not on NT)
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0
Public Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, _
RSP_UNREGISTER_SERVICE)
End Sub
[This message has been edited by taLON (edited 02-09-2000).]
-
Feb 8th, 2000, 06:35 PM
#5
Thread Starter
Hyperactive Member
thank u guys for your support.
bye!
jebs.
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
|