How do you adjust Windows Gamma/Brightness in VB.net?

I have a fully working front-end which I have coded. But obviously there is always room for improvement. I want to be able to have a 'night mode' which will adjust the Windows Gamma or brightness to dim the screen at night. What is the easiest way of doing this with VB.NET? I have searched everywhere, but couldn't find anything.

personally, I used a light sensor, mounted next to the little red blinky light for my security system, and hacked the lcd case open, and just use the light sensor as a variable resistor for the LCD backlight power line..

I would NOT seguest doing this if your not farmilure with electronics; but in my situation, it worked out rather well... at daybreak, the sunload/light sensor sits at 0 ohms resistance, and at night, it goes up to 10k ohms.

This link gives a great walkthrough on how to use it properly; only catch, is when it fails it tends to set the gamma to 0, making the screen VERY dark (remember to SAVE your work before testing) a reboot will cure the blacked screen =D

The software solutions will NOT control the LCD backlight, which leaves alot of ambient light in the car at night; which is why I went for a hardware solution.

I'm an electrical engineer by trade and do a lot of electronics work aswell, using an LDR is an excellent way of adjusting the screen brightness. Great idea!

So, did you set the brightness to full and then let the light dependent resistor simply limit the current to the backlight?

With 10K ohms of resistance, does the screen have any backlight at all?

I've had a quick look on the internet on the Radio Spares website rswww.com but the only LDR's they have are something like 5.5K - 1000K, this would be way too much resistance, don't really want to have to use one of these attatched to transistors, your way seems very simple, I'll have to keep looking.

at 10k, there is just enough backlight that seeps through, to be able to make out what is on the screen when its completely dark
and yes, I leave the backlight brightness at max, and let the sensor limit the voltage to it.
I've only been running it for a short time now, and I'm not sure about the long-term effects on the backlight.

Also, its not a 100% simple solution, as I'm not a very strong solderer, I have a couple of crappy connections that lead to occasional flickering.. I've been tempted to add a cap to clear up the flickering tho... it would make the transitions a bit smoother when going under steet lights also =D

also, on a side note- another issue- I have a 0-18v line, with a pot on it, but the max I can pull through the circuit would be about 400ma.... is there any "clean" way to "amp" the output, without risking pulling over 400ma? the output is going to a power hungry blower motor, that sucks upwards of 15 amps =/

With the motor, you cant simply add resistance in line with it to limit the current because the voltage that is 'dropped' accross the pot will obviously fry it. To control the speed of a motor you would need some sort of speed controller. You could use a 555 timer circuit which uses a pot as the input to tell it how many pulses to output and then feed this into some sort of power transistor.

i would use a silicon controlled rectifier to control the motor speed ..... this was done alot with dc motors before 3 phase motors and variable frequecy inverters became much cheaper. of course im speaking of a slightly larger scale.... but they work well in the small scale too.

but you can get scr's a dime a dozen from places like digikey and mouser electronics