[英]How to change windows control panel settings through C#
More specifically I want to change Visual Effects. 更具体地说,我想更改视觉效果。 My goal is to press a button then have it change the 15 visual effects.
我的目标是按下一个按钮,然后改变15种视觉效果。 Such as turning off "drop shadow" and disabling "fade/slide menus into view."
例如关闭“投影”和禁用“淡入/滑动菜单到视图”。 I did a ton of searching and the only thing I accomplished is how to find out if it is enabled with something like this:
我做了很多搜索,而我唯一要做的就是如何确定是否启用了以下功能:
dropshadow = SystemInformation.IsDropShadowEnabled;
MessageBox.Show("Drop Shadow enabled:"+Convert.ToString(dropshadow));
This is for C# 这是为C#
I think you will need to use pinvoke to achieve this. 我认为您将需要使用pinvoke来实现此目的。
Have a look at http://support.microsoft.com/kb/97142 And here is ac# example http://www.pinvoke.net/default.aspx/user32.systemparametersinfo 看看http://support.microsoft.com/kb/97142 ,这是ac#示例http://www.pinvoke.net/default.aspx/user32.systemparametersinfo
Not sure if this covers everything you want, but should cover most. 不知道这是否涵盖了您想要的所有内容,但应该涵盖大多数内容。
This is what SystemInformation uses under the hood, I believe. 我相信,这就是SystemInformation在幕后使用的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.