CodeProject is your friend: "Setting Screen Brightness in C#: [
^].
Are you aware of the free FLux software ?: [
^].
Frankly, I think the idea of putting a semi-transparent window on top of all the other windows to darken the screen is ... very strange ... I would look for another technique.