How to turn off the Monitor???

Hey friends!
Is it possible to turn the Monitor (Display Device) ON and OFF from a java application???
Thanks a lot!
Ricardo

Hi! This is completely Windows-specific, and I found it on a website, so I don't take credit for it. Hopefully you do know how to use JNI, so here's the C code you could try out (no I haven't tried it yet).
JNIEXPORT void JNICALL Java_JNative_turnOffMonitor (JNIEnv *env, jclass cls)
    SendMessage (HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
}2 turns off the monitor, HWND_BROADCAST sends the message to all top-level windows, 1 sets the monitor to low power and -1 switches the monitor back on. Please use at own risk, and you'll probably want to have some more error handling in your code if you do plan to use it. You will need to include windows.h and user32.lib (unless you are dynamically linking) for the code to compile.
Hope it helps.
Cheers
P.S. Here's the website I found it in (note, the code's in Delphi, so I just took the API calls, and modified the first parameter to HWND_BROADCAST). http://chiragdalal.tripod.com/howto/monitor_on_off.html

Similar Messages

  • MiniDisplay to HDMI : How to turn off the Dual Monitor output when..

    miniDisplay to HDMI : How to turn off the Dual Monitor output when the adapter is attached and the TV is off ? And will keeping the adapter connected even if it is not in use, cause damage to the adapter ?

    I have my external monitor/tv setup of the left. If I leave the adapter attached with the TV off, I am still able to cross the border/boundry of my MBP screen ! As instead of detecting a TV, the MBP is detecting the adapter as a screen. I do not want to damage my thunderbolt/miniDisplay port by plugging and unpluggin the unit each and every time.

  • Turn off the monitoring

    Hi all,
    Does anyone knows about how to turn off the BPM monitoring so that so many tickets will not be created.
    Thanks
    Tripti
    Edited by: Tripti Sharma on Jul 22, 2008 12:36 PM

    Hi,
    that depends on the release u use ... For release <SPS15 u can unasighn the notification method via the TA rz21.
    If u use CEN monitoring its easy to unassign --> just goto TA RZ21 --> start: Technical Infrstructure --> configure central systems --> assign central autoreactions
    The new mask gives u the possibility in the bottom frame to unassign methods.
    If u use lacal monitoring (that u will see when u start the assign central autoreaction and no method where assigned) --> than it will be more difficult u have to unassign every MTE from the auto react methode ... Or u modify the the auto react methode
    BR Lars

  • T43 & "Preparing to turn off the monitor"

    A recently got a second-hand T43 (I will avoid the current shallowscreen laptops as long as I can!), and one thing that bugs me is that Fn+F3 "turn off screen" seldom works (Windows XP SP3). Usually I just get the dialog saying "Preparing to turn off the monitor", but nothing happens after that. I read somewhere that Windows Media Player can cause this when running, but it is not running. And why should it matter anyway? Is there any way to force the screen to be turned off despite running programs?
    Also, it would be nice if this action locked the screen, or if it was available after locking the screen. Is this possible in any way?

    Hi! This is completely Windows-specific, and I found it on a website, so I don't take credit for it. Hopefully you do know how to use JNI, so here's the C code you could try out (no I haven't tried it yet).
    JNIEXPORT void JNICALL Java_JNative_turnOffMonitor (JNIEnv *env, jclass cls)
        SendMessage (HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
    }2 turns off the monitor, HWND_BROADCAST sends the message to all top-level windows, 1 sets the monitor to low power and -1 switches the monitor back on. Please use at own risk, and you'll probably want to have some more error handling in your code if you do plan to use it. You will need to include windows.h and user32.lib (unless you are dynamically linking) for the code to compile.
    Hope it helps.
    Cheers
    P.S. Here's the website I found it in (note, the code's in Delphi, so I just took the API calls, and modified the first parameter to HWND_BROADCAST). http://chiragdalal.tripod.com/howto/monitor_on_off.html

  • HT4314 Does anyone know how to turn off the pics of your Game Center friends showing on the right side of the screen while playing a game?

    Does anybody know how to turn off the pics of your Game Center friends that show while you're playing a game?

    Swamava,
    Thank you for the link you provided and I am glad I am not the only one with this problem, however beforeI install Adblock is it a free program or is there a fee you
    must pay to download the program? I am some what hesitant to be oblighted to
    a monthly or yearly bill.
    i

  • Can I turn off the monitor for Mac Mini and use it as a music server?

    I am in the process of upgrading my PC most likely to a Mac product. With the non-server version of Mac OS X, can I turn off the monitor connected to a Mac Mini and use it as a streaming server? Or I have to get the server version of OS X to do that?

    I plan to run Logitech Media Server on the Mac to stream music to players. Each player interacts with the Logitech Media Server to select songs to stream. When I turn on a player, it will wake up the computer from the sleep mode.
    Currently, this Logitech Media Server runs on a Windows Vista machine and it will keep the PC from entering sleep mode while playing the songs. After I play the last song, the PC will start the idle count down and then enter into sleep mode.
    Do you see any problem with my intended use of a Mac Mini?

  • How i turn off the cinema display?

    How i turn off the cinema display?

    Unfortunately there is no on off switch.
    The best you can do is sleep the display or
    unplug it.
    I don’t know what unplugging it will do/cause.
    You can try it.
    Thanks ... Ken

  • TS3988 how to turn off the passcode after phone is located

    how to turn off the pass code after you have found your phone with i cloud

    Enter the passcode on it to unlock it, then you can turn off the passcode lock in Settings>General>Passcode Lock.

  • When mirroring - can I turn off the monitor on my Mac...?

    I just set up my MacBook Pro with my AppleTV and everything is working nicely. However, It would be even better if I could get my computer monitor to turn off while I'm viewing on my TV.
    Is this possible?

    Actually, the answer is YES!
    Thought it best to post here again because I discovered that while Mirroring, turning off the monitor on my MacBook Pro is possible (despite a few replies here that it cannot be done). Its super easy to do, just dim the monitor until it goes completely dark, and continue to use your computer as it is displayed on the TV. The trick is not to close the monitor down, that will put the computer to sleep.
    While I was hoping I could also achieve the same result while my MacBook is connected to my Cinema display, it seems the dimming capability on the Cinema display is limited to getting very dim, but not turning off completely.
    I'll keep researching this some more and if I have any more updates I will post back to share -- hopefully there are other users who will find this info helpful.
    For now, I will be using my TV as my primary display while my MacBook Pro's monitor is turned off.

  • Please help me to find out how to turn off the shuffle feature on my touch i-pod, Please help me to find out how to turn off the shuffle feature on my touch i-pod

    Please help me to find out how to turn off the shuffle feature on my I-pod nano ... THANK YOU!!!!!! :)

    Just figured it out :) Thanks though!!!

  • HT5372 how i turn off the icloud symbol so that i can share with my sons laptop

    how i turn off the icloud symbol so that i can share with my sons laptop

    Which icloud symbol?  The one in System Preferences on a mac or in Settings on an iDevice?

  • Aladdin eToken using the Web browsing with Firefox. Firefox often asked to enter a password eToken. How to turn off the continuous requests?

    Aladdin eToken using the Web browsing with Firefox. Firefox often asked to enter a password eToken. How to turn off the continuous requests

    I have found a solution.
    For all they wont use a etoken to surf.
    Go to extras, options then extendet and go to cryptographic module and unload the etoken. To unload the etoken you must selekt etoken not the name of the token.
    i have translate the menu names from german to english.

  • Could you please tell me how to turn off the email sign-in and password function when I open Itunes on my computer - I don not wish to sign in every time

    could someone please tell me how to turn off the email sign-in and password function when I open Itunes on my computer - I don not wish to sign in every time

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Someone PLEASE tell me how to turn off the community emails being sent to my email. there are hundreds of them

    SOMEONE PLEASE TELL ME HOW TO TURN OFF THE COMMUNITY EMAIL BEING SENT TO ME. THERE ARE THOUSANDS IN MY EMAIL. I HAVE TO SPEND HOURS DELETING THEM. SOMEONE PLEASE TELL ME HOW TO TURN IT OFF!! PLEASE HELP ME! THANK-YOU
    <Email Edited by Host>

    Follow these instructions
    https://discussions.apple.com/static/apple/tutorial/email.html

  • My  BEATS speakers are connected to my Mac but I have no audio and do not understand how to turn off the speaker. I press the power button and not shut off. And the white light behind me indicating that this synchronized, does not turn off ever.

    My  BEATS speakers are connected to my Mac but I have no audio and do not understand how to turn off the speaker. I press the power button and not shut off. And the white light behind me indicating that this synchronized, does not turn off ever.

    Hello Sabroso007
    Check out the article below to troubleshoot the sound output to your Bluetooth speaker. Check in System Preferences > Sound to see what the output is set to.
    OS X Mavericks: Set up Bluetooth audio devices
    http://support.apple.com/kb/PH14217
    Regards,
    -Norm G.

Maybe you are looking for

  • How do I go to a web site when I click on a button ?

    Hello I am going a GUI program that would go to a program or a web site when a button is clicked. What do I have to do to access a web site ? for instance:     if (e.getSource() == myJButtonBible)           // go to www.nccbuscc.org/nab/index.htm    

  • Setting dynamic text not working in AS2

    I'm working on a complex file given to me by another designer and I'm having a problem with being able to set dynamic text. Basically, I just want to set the text of a nested instance (e.g., with an instance called foo and a instance inside foo calle

  • Page Display setting problem in Form 10g

    Hi All: I am using Oracle Developer Forms [32 Bit] Version 10.1.2.0.2. I have created a Form. When I execute the form it does not maximize the MDI window on the Page. Form doest not fit into the window although I have tried to change the Width and He

  • Maximize my Network

    Hey Everyone. I would like some advice from someone on how to maximize my network. I have Verizon Fios. I have there Modem/Wireless Router. As well as a time capsule and a airport express. I have the time capsule set to be its own wireless network co

  • OIM connector for AD 2008 and exchange 2008

    hello, Customer is in migration of AD 2003 to AD 2008 and exchange 2003 to Exchange 2008. I do know that OIM connects exists for AD 2003 and Exchange 2003.. but not seen any for AD 2008 or Exchange 2008.. So, does any one have idea that how to get th