是否有任何方法可以在C#ctrl + alt + del中禁用注销,锁定和任务管理器

在运行我的窗口应用程序。 如果用户按ctrl + alt + del我需要禁用这些按钮..有任何方法

您无法禁用它们,但可能您想要禁用任务管理器,或者锁定。

 Disable Lock Workstation button: Hive: HKEY_CURRENT_USER Key: Software\Microsoft\Windows\CurrentVersion\Policies\System Name: DisableLockWorkstation Type: REG_DWORD Value: 1 disable Disable Task Manager button: Hive: HKEY_CURRENT_USER Key: Software\Microsoft\Windows\CurrentVersion\Policies\System Name: DisableTaskMgr Type: REG_DWORD Value: 1 disable 

你也可以考虑

 Disable Change Password button: Hive: HKEY_CURRENT_USER Key: Software\Microsoft\Windows\CurrentVersion\Policies\System Name: DisableChangePassword Type: REG_DWORD Value: 1 disable Disable Logoff button: Hive: HKEY_CURRENT_USER Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer Note: change from System to Explorer Name: NoLogoff Type: REG_DWORD Value: 1 disable 

我当然希望不是 – CtrlAltDel组合键被操作系统拦截,永远不会传递给应用程序。 这是一个安全措施:如果用户按下CtrlAltDel ,则可以保证用户将看到的是登录屏幕/任务管理器(取决于您拥有的Windows版本),而不是某些试图窃取他的应用程序密码(我并不是说这是你的意图,但这样的应用程序是CtrlAltDel旨在防止的)。

如果我没记错的话,CTRL-ALT-DEL是唯一无法覆盖的组合键。

我有同样的问题。 我不得不让用户访问Ctrl+Alt+Delfunction。 我找到了解决方法来禁用它们。 我更改了注册表中的键盘映射。 由于删除Ctrl-Alt-Delfunction可能很危险,我只需通过ScrollLock键切换Alt键。 为此,您需要添加以下注册表项(有关更多说明,请参阅此网站 ,如果您想通过另一个键更改ScrollLock 但在此处链接 ,则可以在任何地方找到键盘扫描代码):

 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout Key Name: Scancode Map Type: Binary Value to enter: 00 00 00 00 00 00 00 00 03 00 00 00 => represent the number of keys you are modifying + 1 (for some reason, mapping to another key is not counting as 1) 00 00 38 00 => Left-Alt key is 38 00 so here we give 00 00 (nothing) to the Left-Alt key. It will disable it. 38 00 46 00 => ScrollLock key is 46 00 so here we give the Left-Alt key functionality to our ScrollLock key. ScrollLock will be Alt key now. 00 00 38 E0 => Right-Alt key is 38 E0 so here we give 00 00 (nothing) to the Right-Alt key. It will disable it. 00 00 00 00 => Terminator 

希望它能帮助你们中的一个! 您只需在应用程序中注册此密钥,但请注意它会影响整个系统!