你可以拦截ctrl+alt+del,不过这样只有在程序激活时才有用,程序最小化时就没用了,除非你在程序关闭以前,拦截所有的WINDOWS操作,包括切换出程序

解决方案 »

  1.   

    http://www.csdn.net/expert/topic/212/212466.xml?temp=2.927798E-02
    主  题:  用vb做一个程序,运行后,怎样逃过del+alt+ctrl的检查?谢谢! 
      

  2.   

    回复人: xuqy2001(鹰浪子) ( 
    调用API函数让其在Ctrl+Alt+Del的程序列表中消失,需要把自己的程序注册为服务器(Service),这可以利用RegisterService API函数将程序的进程ID进行注册来实现。在程序退出时再次使用此API函数将服务器注册取消。方法如下:
      1.在窗体的声明部分声明加入API函数和需要的常数:
      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
      2.注册为service和释放注册的过程:
      在Form_Load事件的开始添加如下代码
      Dim pid As Long
      Dim reserv As Long
      pid = GetCurrentProcessId() ′得到当前进程ID
      regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE) ′把本程序注册为service
      把Form_QueryUnload事件修改为如下代码,即在程序结束时把服务器注册取消
      Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
      Dim pid As Long
      Dim reserv As Long
      Close #1
      pid = GetCurrentProcessId()
      regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
      End Sub
      

  3.   

    回复人: xuqy2001(鹰浪子) ( 
    调用API函数让其在Ctrl+Alt+Del的程序列表中消失,需要把自己的程序注册为服务器(Service),这可以利用RegisterService API函数将程序的进程ID进行注册来实现。在程序退出时再次使用此API函数将服务器注册取消。方法如下:
      1.在窗体的声明部分声明加入API函数和需要的常数:
      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
      2.注册为service和释放注册的过程:
      在Form_Load事件的开始添加如下代码
      Dim pid As Long
      Dim reserv As Long
      pid = GetCurrentProcessId() ′得到当前进程ID
      regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE) ′把本程序注册为service
      把Form_QueryUnload事件修改为如下代码,即在程序结束时把服务器注册取消
      Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
      Dim pid As Long
      Dim reserv As Long
      Close #1
      pid = GetCurrentProcessId()
      regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
      End Sub
      

  4.   

    如果单单想逃避任务管理器应用程序栏的检查那么做成无窗口的就可以了。如果要隐藏进程,好像是可以的,不过我不知道了,嘿嘿,应该是用API
      

  5.   

    Private Sub Form_Load()
        App.TaskVisible = False
    End Sub
      

  6.   

    junwhj() 
    太好了!让我也学了一招!
      

  7.   

    App.TaskVisible = False
      

  8.   

    App.TaskVisible = False'对win95可以
      

  9.   

    Declare Function RegisterServiceProcess Lib "kernel32" (ByVal _
        ProcessID As Long, ByVal ServiceFlags As Long) As Long
    Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    '隐藏
    RegisterServiceProcess GetCurrentProcessId, 1
    '显示
    RegisterServiceProcess GetCurrentProcessId, 0