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 = 0Public Sub HideMe()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub

解决方案 »

  1.   

    只能用于98/ME
    Option ExplicitPrivate 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 LongConst RSP_SIMPLE_SERVICE = 1
    Const RSP_UNREGISTER_SERVICE = 0Public Sub RemoveProgramFromList()
        Dim lngProcessID As Long
        Dim lngReturn As Long
        Dim pid As Long
        lngProcessID = GetCurrentProcessId()
        lngReturn = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
      

  2.   

    Const RSP_SIMPLE_SERVICE = 1
    Const RSP_UNREGISTER_SERVICE = 0
    Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
    Public Sub MakeMeService()
        Dim pid As Long, reserv As Long
        'Get the current process ID
        pid = GetCurrentProcessId()
        'Register as service
        regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
    Public Sub UnMakeMeService()
        Dim pid As Long, reserv As Long
        'Get the current process ID
        pid = GetCurrentProcessId()
        'Unregister as service
        regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
    End Sub
    Private Sub Form_Load()
        'KPD-Team 1999
        'URL: http://www.allapi.net/
        'E-Mail: [email protected]
        MakeMeService
        'Right now, you're program is hidden from the CTRL-ALT-DEL-list
    End Sub
    Private Sub Form_Unload(Cancel As Integer)
        UnMakeMeService
    End Sub
      

  3.   

    用杀DLL的方法,什么都看不到你的程序
      

  4.   

    呵呵,最简单的就是 App.TaskVisible=False.:)
      

  5.   

    App.TaskVisible=False对没有Form的起作用
    如果要隐藏你的程序,注意控制面板的"添加/删除"里面也要隐藏.
      

  6.   

    哈哈,都是Win98的办法。谁有Win2000的。
      

  7.   

    Win2000也可以实现类似的效果。不过需要进程注入,不是VB能简单实现的。
    讨论也没用。而且,确实没有多大价值,除非想写木马之类的无聊的东西(我对这种人很反感,呵呵)。
      

  8.   

    同意: Chice_wxg(我怕谁?我是谁!我是流氓我最贼。)不要干那些事情
      

  9.   

    app.taskvisible=false不就行了吗?