Compartir a través de


Best practices for software developers

In Windows Vista and earlier versions of Windows, APIs are provided to enable applications to control the display brightness level. System manufacturers typically use these APIs to enable value-added extensions for controlling the display brightness level on systems where the keyboard hot keys are not implemented using Advanced Configuration and Power Interface (ACPI) notifications or Human Interface Device (HID).

We recommend that software developers do not use the existing Windows Management Instrumentation (WMI) APIs or legacy video driver input/output (I/O) controls (IOCTLs) to change the display brightness level. Windows 8 supports adjusting the display brightness level based on the dim idle time-out setting to save power. Applications can unintentionally interfere with the adaptive display brightness feature, which results in a poor user experience.

If an application must adjust the display brightness level to provide an additional display brightness control interface such as a slider control, the application should adjust the current power policy settings. The application should first determine the current system power source and current power plan. Then, using this information, the application can change the display brightness level by calling either the PowerWriteACValueIndex or PowerWriteDCValueIndex function, as appropriate.

 

 

Send comments about this topic to Microsoft