使程序在按 Alt+Ctrl+Del 时不出现:Option Explicit Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long Private Declare Function GetCurrentProcess Lib "kernel32" () As Long Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long Private Const RSP_SIMPLE_SERVICE = 1 Private Const RSP_UNREGISTER_SERVICE = 0
Private Sub MakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() RegisterServiceProcess pid, RSP_SIMPLE_SERVICE End Sub
Private Sub UnMakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() RegisterServiceProcess pid, RSP_UNREGISTER_SERVICE End Sub
Private Sub Command1_Click() Call MakeMeService '使程序在 Ctrl+Alt+Del 窗口隐藏 End Sub
Private Sub Command2_Click() Call UnMakeMeService '使程序在 Ctrl+Alt+Del 窗口显示 End Sub
再用vb5盘下的tool\systray\systray.ocx便可以驻留在系统托盘。
这样便可以了。
你有两种方法可参考:1、将程序缩小在 SysTray 里。2、索性将程序完全隐藏.
1、怎样将程序缩小在 SysTray 里。2、怎样将程序完全隐藏.
我公布得分:
subzero 5
Herro 5
xiaohuilau 5
shines 46
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Private Const RSP_SIMPLE_SERVICE = 1
Private Const RSP_UNREGISTER_SERVICE = 0
Private Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, RSP_SIMPLE_SERVICE
End Sub
Private Sub UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, RSP_UNREGISTER_SERVICE
End Sub
Private Sub Command1_Click()
Call MakeMeService '使程序在 Ctrl+Alt+Del 窗口隐藏
End Sub
Private Sub Command2_Click()
Call UnMakeMeService '使程序在 Ctrl+Alt+Del 窗口显示
End Sub