在C#中禁用控制面板 [英] Disable control panel in c#

查看:88
本文介绍了在C#中禁用控制面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...我想问一下我如何使用C#禁用控制面板?它可以在Windows XP和Windows 7中使用吗?预先感谢伙计们

hi guys... i would like to ask how do i disable the control panel using c#?and could it be applied in windows xp and windows 7? Thanks in advance guys

推荐答案

要在控制面板中禁用控件,可以使用
以编程方式完成
To disable a control in the control panel, it can be done programmatically using
Control.ControllCollection.Remove()



但是要禁用控制面板"对任何用户的访问,请通过注册表编辑器.如果要手动执行此操作,请按照以下步骤操作.如果要编写程序,请重新编写C#代码.



But to disable Control Panel access to any user, itz possible thro registry editor. If you want to do it manually, just follow the below steps. If you want to write a program, re write into C# code.

Get keys KEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies.
Get string value NoControlPanel.
If (string value not found)
     Add under Policies Key.
Update string value to 1 for Disable; 0 Enable.


这篇关于在C#中禁用控制面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆