How can I support Screen brightness with C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a project, and would like to support screen brightness up/down in C#,
anyone can help me about this issue, I know one possibility is write a
driver, and
AP through driver to control the H/W.

Is anyway can adjust the screen brightness without driver?
 
Steve,

If the display supports it, you can call the DeviceIoControl function
through the P/Invoke layer in the Windows API, and pass
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS for the dwControlCode parameter.

Hope this helps.
 
Nicholas,

thanks for the hint, yes, it should be the easiest way to adjust the
brightness, really appreciated.

B. RGDS
Steve

Nicholas Paldino said:
Steve,

If the display supports it, you can call the DeviceIoControl function
through the P/Invoke layer in the Windows API, and pass
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS for the dwControlCode parameter.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Steve said:
I have a project, and would like to support screen brightness up/down in
C#,
anyone can help me about this issue, I know one possibility is write a
driver, and
AP through driver to control the H/W.

Is anyway can adjust the screen brightness without driver?
 
Back
Top