锁定屏幕,禁用鼠标键盘,禁用任务管理器 public Form1()
 public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            LockWorkStation();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            BlockInput(true);//锁定鼠标及键盘
            Thread.Sleep(5000);
            BlockInput(false);//解除锁定鼠标及键盘
        }
         
        private void button3_Click(object sender, EventArgs e)
        {
            if (button3.Text=="禁用任务管理器")
         {
                button3.Text="启用任务管理器";
                ManageTaskManager(1);
  
         }else
         {
                button3.Text="禁用任务管理器";
                ManageTaskManager(0);        
         }
            
        }        

 
  
					
				
评论