Is there a way to control to a windows-ce 5.0 tablet devic开发者_如何学Goe (DAP CE8800) backlight (dim/bright) programatically using C#?
There is no standard OS-defined mechanism for backlight operation (intensity or active/inactive). Those devices that do have programmatic control (and not all do) use proprietary APIs. Sometimes it's a driver call, sometimes a developer API, and sometimes it's more esoteric (like a CPL call).
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.
It turns out DAP does support backlight control on this tablet. I was able to get it to work by adding DapServiceCS.dll and this code:
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);
}
精彩评论