-
In my prog, I am hiding the taskbar when it starts and bringing it back when the user quits, but my problem is when the user quits by ctrl-alt-del, the task bar doesnt come back. I am trying to figure out which method I can put my code to bring it back.
Michael Raczynski
Developer
-
Is there any reason why you can't disable the Crtl, Alt ,Del ?.
-
Hutchie,
Well if my program crashes for 'some' reason, wouldnt it be nice to let the user ctrl-alt-del, instead of re booting?
Michael Raczynski
-
-
and if you put a code in FORM_TERMINATE that re-shows the taskbar ?
-
Talon,
I have tried the form_unload, form_query_unload, and the form_terminate. Not one of those three work. I am guessing that there is a call made to a specific method when the user closes the program via ctrl-alt-del.
If anyone knows this method, plese let me know!
Michael Raczynski
Developer
[This message has been edited by Michael Raczynski (edited 02-21-2000).]
-
Strange that the Query_Unload event didn't work. It always worked fine for me.
eg
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppTaskManager Then
'do your stuff
End If
End Sub
-
mhhh.... other way is to make install you're app as an service... so it isn't listed in the ctrl+alt+entf 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
---------
hope that helps....