|
-
Feb 15th, 2000, 10:27 PM
#1
Thread Starter
New Member
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
-
Feb 16th, 2000, 11:49 PM
#2
Junior Member
Is there any reason why you can't disable the Crtl, Alt ,Del ?.
-
Feb 17th, 2000, 03:05 AM
#3
Thread Starter
New Member
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
-
Feb 17th, 2000, 04:28 AM
#4
Junior Member
-
Feb 17th, 2000, 11:53 AM
#5
and if you put a code in FORM_TERMINATE that re-shows the taskbar ?
-
Feb 20th, 2000, 09:16 PM
#6
Thread Starter
New Member
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).]
-
Feb 21st, 2000, 03:47 AM
#7
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
-
Feb 21st, 2000, 12:28 PM
#8
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....
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
|