Solved

Control Monitor

Posted on 2004-10-22
245 Views
Last Modified: 2010-05-02
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
0
Question by:pitmanromford
    9 Comments
     
    LVL 76

    Accepted Solution

    by:
    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
     
    LVL 2

    Author Comment

    by:pitmanromford
    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
     
    LVL 2

    Author Comment

    by:pitmanromford
    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
     
    LVL 76

    Expert Comment

    by:GrahamSkan
    OK. I'll look again. But I only have a gForce2 card.
    0
     
    LVL 2

    Author Comment

    by:pitmanromford
    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
     
    LVL 76

    Expert Comment

    by:GrahamSkan
    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
     
    LVL 4

    Expert Comment

    by:AjithJose
    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
     
    LVL 2

    Author Comment

    by:pitmanromford
    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
     
    LVL 2

    Author Comment

    by:pitmanromford
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Prepare to Pass the CompTIA A+ 900 Series Exam

    CompTIA aims to adapt its A+ Certification to reflect the most current knowledge and skills needed by today's IT professionals--and this year's 2016 exam is harder than ever. This certification is one of the most highly-respected and sought after in IT.

    Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now