The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Coders Corner

Reply
 
Thread Tools Display Modes
Old 03-14-2008, 09:54 AM   #1
Constant Bitrate
portreathbeach's CarPC Specs
 
Join Date: Sep 2006
Location: Cornwall, England
Vehicle: 2003 VW Transporter T5
Posts: 144
My Photos: (46)
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.

Thanks
__________________
ViVE - Volkswagen In Van Entertainment:

VoomPC 2, VIA C7 2GHz
7" Lilliput
120Gb Sata drive
1GB RAM


[||||||||||] 100% - Planning
[||||||||||] 100% - Software coding
[||||||||||] 100% - Built

(Always tweaking!)
portreathbeach is offline   Reply With Quote
Sponsored Links
Old 05-06-2008, 03:34 PM   #2
Newbie
 
Join Date: Apr 2008
Posts: 12
My Photos: (0)
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.

But, back to your question:
SendMessage is what your looking for; SetDeviceGammaRamp() is your golden egg =)

Option 2, which is a bit messy for actual workstations, but should work fine in a carputer, is DeviceIoControl():
http://www.dreamincode.net/forums/bl...?showentry=596

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.

peace
Mike
conjur is offline   Reply With Quote
Old 05-06-2008, 04:13 PM   #3
Constant Bitrate
portreathbeach's CarPC Specs
 
Join Date: Sep 2006
Location: Cornwall, England
Vehicle: 2003 VW Transporter T5
Posts: 144
My Photos: (46)
Hi Conjur,

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.
__________________
ViVE - Volkswagen In Van Entertainment:

VoomPC 2, VIA C7 2GHz
7" Lilliput
120Gb Sata drive
1GB RAM


[||||||||||] 100% - Planning
[||||||||||] 100% - Software coding
[||||||||||] 100% - Built

(Always tweaking!)

Last edited by portreathbeach : 05-06-2008 at 04:25 PM.
portreathbeach is offline   Reply With Quote
Old 05-10-2008, 03:09 PM   #4
Newbie
 
Join Date: Apr 2008
Posts: 12
My Photos: (0)
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 =/

peace
Mike
conjur is offline   Reply With Quote
Old 05-10-2008, 05:05 PM   #5
Constant Bitrate
portreathbeach's CarPC Specs
 
Join Date: Sep 2006
Location: Cornwall, England
Vehicle: 2003 VW Transporter T5
Posts: 144
My Photos: (46)
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.

Have a look here, half way down the page,

http://www.educypedia.be/electronics...torcontrol.htm

loads of DC motor control stuff.

It's not a straight forward thing!
__________________
ViVE - Volkswagen In Van Entertainment:

VoomPC 2, VIA C7 2GHz
7" Lilliput
120Gb Sata drive
1GB RAM


[||||||||||] 100% - Planning
[||||||||||] 100% - Software coding
[||||||||||] 100% - Built

(Always tweaking!)
portreathbeach is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista experiences anyone? Nomader Road Runner 80 01-10-2008 08:01 PM
New Frontend for Windows and Linux gbr Other Cool Front Ends 66 10-26-2006 05:08 PM
Installing Windows 2000 Pro on a 1GB Microdrive JeremyM WinNT Based 2 05-07-2005 09:56 PM
Windows Freeze When Crank, Crank again windows unfreeze antimatter Power Supplies 37 07-27-2004 12:40 AM
Windows ME and MediaCar dug1967 MediaCar 15 04-15-2004 01:30 PM


All times are GMT -5. The time now is 01:27 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics