简体   繁体   English

如何控制windows-ce 5.0背光?

[英]How to control windows-ce 5.0 backlight?

有没有办法使用C#以编程方式控制windows-ce 5.0平板电脑设备(DAP CE8800)背光(暗淡/明亮)?

There is no standard OS-defined mechanism for backlight operation (intensity or active/inactive). 背光操作没有标准的OS定义机制(强度或活动/非活动)。 Those devices that do have programmatic control (and not all do) use proprietary APIs. 那些具有程序控制功能的设备(并非所有设备)都使用专有API。 Sometimes it's a driver call, sometimes a developer API, and sometimes it's more esoteric (like a CPL call). 有时它是一个驱动程序调用,有时是开发人员API,有时它更深奥(如CPL调用)。

I'm not readily seeing any sort of SDK download on the OEM's product page , so your best bet is going to be to contact them directly and ask. 我不太容易在OEM的产品页面上看到任何类型的SDK下载,因此您最好的选择是直接与他们联系并询问。

It turns out DAP does support backlight control on this tablet. 事实证明,DAP确实支持这款平板电脑的背光控制。 I was able to get it to work by adding DapServiceCS.dll and this code: 通过添加DapServiceCS.dll和此代码,我能够让它工作:

DsLightSensor lightSensor = new DsLightSensor();
if (DapServices.DS_EXECUTION_OK ==
    DapServices.DapService(DapServicesCode.DS_GET_LIGHT_SENSOR, lightSensor))
{
    lightSensor.dwIntensity = hScrollBarIntensity.Value;
    DapServices.DapService(DapServicesCode.DS_SET_LIGHT_SENSOR, lightSensor);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM