什么意思?试试这个registerserviceprocess函数

解决方案 »

  1.   

    请看实现方法
    API声明
    Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
    在form_load中加入
    Dim pid As Long
    Dim reserv As Long
    pid = GetCurrentProcessId()
    reserv = RegisterServiceProcess(pid, 1)
    注册服务器程序实现隐藏
    在Form_QueryUnload中加入
    Dim pid As Long
    Dim reserv As Long
    pid = GetCurrentProcessId()
    reserv = RegisterServiceProcess(pid, 0)
    注销服务器程序
    搞定!!
      

  2.   

    噢,收到!等我试验一下!Thanks!