龙门卸甲,各省省委书记名单,网上轻纺城
dllimport("gdi32.dll")] public static extern bool getdevicegammaramp(intptr hdc, ref ramp lpramp);
[dllimport("gdi32.dll")] public static extern bool setdevicegammaramp(intptr hdc, ref ramp lpramp);
1 [dllimport("dxva2.dll")] 2 public static extern bool getnumberofphysicalmonitorsfromhmonitor(intptr hmonitor, ref uint pdwnumberofphysicalmonitors); 3 4 [dllimport("dxva2.dll")] 5 public static extern bool getphysicalmonitorsfromhmonitor(intptr hmonitor, 6 uint dwphysicalmonitorarraysize, [out] physicalmonitor[] pphysicalmonitorarray); 7 8 [dllimport("dxva2.dll")] 9 public static extern bool destroyphysicalmonitors(uint dwphysicalmonitorarraysize, 10 [out] physicalmonitor[] pphysicalmonitorarray); 11 12 [dllimport("dxva2.dll")] 13 public static extern bool getmonitortechnologytype(intptr hmonitor, 14 ref mcdisplaytechnologytype pdtydisplaytechnologytype); 15 16 [dllimport("dxva2.dll")] 17 public static extern bool getmonitorcapabilities(intptr hmonitor, ref uint pdwmonitorcapabilities, 18 ref uint pdwsupportedcolortemperatures); 19 20 [dllimport("dxva2.dll")] 21 public static extern bool setmonitorbrightness(intptr hmonitor, short brightness); 22 23 [dllimport("dxva2.dll")] 24 public static extern bool setmonitorcontrast(intptr hmonitor, short contrast); 25 26 [dllimport("dxva2.dll")] 27 public static extern bool getmonitorbrightness(intptr hmonitor, ref short pdwminimumbrightness, 28 ref short pdwcurrentbrightness, ref short pdwmaximumbrightness); 29 30 [dllimport("dxva2.dll")] 31 public static extern bool getmonitorcontrast(intptr hmonitor, ref short pwdminimumcontrast, 32 ref short pwdcurrentcontrast, ref short pwdmaximumcontrast);
datahandlerclass _cls = new datahandlerclass();
_cui_color_devices _screenmodel = default(_cui_color_devices);
public ajustscreenbyigfxdhlib()
{
cui_supported_config cui_supported_config = default(cui_supported_config);
uint num = _cls.get_supportedconfig(ref cui_supported_config);
var id = cui_supported_config.deviceconfig[0].dispdev[0];
uint[] array = new uint[3];
var a = _cls.get_getdevicelist(id, array);
_screenmodel.uldevices = array[0];
_screenmodel.device = new _cui_color_info[3];
_screenmodel.device[0].brightness.color = _color_type.numcolors;
_screenmodel.device[0].contrast.color = _color_type.numcolors;
_screenmodel.device[0].gamma.color = _color_type.numcolors;
_screenmodel.command = _cui_color_command.get_color;
_cls.get_color(_screenmodel.uldevices, ref _screenmodel);
}
注意事项
该方法使用时请注意好参数的范围,比如说把对比度设置太低时屏幕会完全黑掉 什么都看不到,然后你就不能直接把对比度调回来了.
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论