请问怎样在DELPHI编写的程序中关闭与打开ctrl+alt+del 也就是让人无法打开任务管理器
谢谢!

解决方案 »

  1.   

    转个代码:
    屏蔽任务管理器的代码:
    uses 
      Registry; procedure EnableTaskManager(YesNo : boolean); 
    const 
    sRegPolicies = '\Software\Microsoft\Windows\CurrentVersion\Policies'; 
    begin 
      with TRegistry.Create do 
      try 
        RootKey:=HKEY_CURRENT_USER; 
        if OpenKey(sRegPolicies+'\System\',True) then 
        begin 
          case YesNo of 
            False: 
              begin 
                WriteInteger('DisableTaskMgr',1); 
              end; 
            True: 
              begin 
                WriteInteger('DisableTaskMgr',0); 
              end; 
          end; 
        end; 
        CloseKey; 
        if OpenKey(sRegPolicies+'\Explorer\',True) then 
        begin 
          case YesNo of 
            False: 
              begin 
                WriteInteger('NoChangeStartMenu',1); 
                WriteInteger('NoClose',1); 
                WriteInteger('NoLogOff',1); 
              end; 
            True: 
              begin 
                WriteInteger('NoChangeStartMenu',0); 
                WriteInteger('NoClose',0); 
                WriteInteger('NoLogOff',0); 
              end; 
          end; 
        end; 
        CloseKey; 
      finally 
        Free; 
      end; 
    end;
      

  2.   

    还有简单的办法方法是进入"开始"菜单,选择"运行",然后在运行对话框中输入"gpedit.msc",启动Windows系统的组策略编辑器。在左边窗格查看"用户配置|管理模板|系统|登录/注销",则在右边窗格策略里不难发现"禁用任务管理器"一项。通过对这个策略的设置可以屏蔽掉Ctrl+Alt+Del。如果要通过编写代码来实现,则必须操作下面的注册表项:HKCU\par Software\par Microsoft\par Windows\par CurrentVersion\par Policies\par System= dword:1上面的方法From 猛料.
      

  3.   

    谢谢 Kshape([伟大的大伟!]) 其实我是想写个程序一进入WINDOWS就运行,一定要执行我的程序也就是输入正确密码后方可使其他功能,就问我该怎样写,请赐教,谢谢!