Control Monitor

Even when you make the screen completly black, when there's no other light in a room, you can still see the "black" monitor glow, unless, you set the brightness on a monitor lower than what it is.

It seems a bit unreasonable to get the user to turn down the monitors brigtness to use my application (since it's going to be used in a dark room, and the room needs to remain dark yet an image needs to be shown on the screen, which is not a problem if the brightness is turned down), is there a way, and if so, how can you get a VB application to decrease and increase the brightness of the monitor (or possibly globally over windows?) - note:  Monitor going on standby is not a solution

Thanks in advance
Lee
LVL 2
pitmanromfordAsked:
Who is Participating?
 
GrahamSkanRetiredCommented:
As far as I know, there is no programmatic (VB or not) way to control the monitor settings. Even if there were, you would still need a sensor of some sort to detect the ambient light level.
What a VB prog could do is to adjust all the colours of the application to lower (darker) values according to some user input, but it would not be simple. You would have to loop round each form and each control. If you had incorporated images, they would hav to be treated pixel-by-pixel.
0
 
pitmanromfordAuthor Commented:
I cant remember if it's in windows XP or 98, but u can set the contrast somewhere in control panel (i.e. make things bluey or more red), surely if you were to set all 3 colours down symultaneously, it would darken the image? - an api somewhere?
0
 
pitmanromfordAuthor Commented:
Found - In my geForce 3 setting there's an option to do this, i think if i diddnt have ge force there was a way windows could do it, look somewhere in controlpanel/display/settings/advanced, and one of the tabs in there?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
GrahamSkanRetiredCommented:
OK. I'll look again. But I only have a gForce2 card.
0
 
pitmanromfordAuthor Commented:
Just a hunch, whenever windows makes a change, such as a resolution change, it's to my belief that it issues a sendmessage command that i think can be trapped or executed with an api:

Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwFlags As Long) As Long

If this is how to do it, i have no idea what the constants to be used are or where to find them, there's loads, but i cant find a site with all of them, i'm currently on:  http://www.mentalis.org/apilist/ChangeDisplaySettings.shtml

Might help, i honestly have no clue though
Lee
0
 
GrahamSkanRetiredCommented:
OK Lee,
There are no brightness/contrast/gamma settings in my display (advanced). I don't seem to have a gForce control facility. I'll try to use anything I find plus messaging over the weekend. Visual Studio, of which VB is a part, comes with some message capture tools. You may have them yourself.
I am still pessimistic about success, but we seem to be alone in this endeavour.
Cheers, Graham
0
 
AjithJoseCommented:
This URL will help you:

Gama Manager from CodeProject: http://www.codeproject.com/miscctrl/gamma_manager.asp

Exe and sourcecode  in VB, VC are available for download . Definitely worth a try.

~Ajith

0
 
pitmanromfordAuthor Commented:
Hi AjithJose, unfortunatly it would appear that the brightness of a monitor is not related to it's gamma, since I still get the screen glow, is it possible to extend the code to make the gamma reduce futher still (just incase it may still work)?
0
 
pitmanromfordAuthor Commented:
Well it seems like it cant be done, after testing, the graphics card setting effectivly did what Ajith's code did, which was not really helpfull for my situation - thanks anyway
Lee
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.