www.webdeveloper.com
Results 1 to 2 of 2

Thread: Java display colors

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    Sweden
    Posts
    123

    Exclamation Java display colors

    Code:
    new java.awt.Robot().getPixelColor(x,y); // returns the color of the pixel at (x,y)
    When screensaver is running, this function will return the color of the screensaver that time. Is there any way to work around this, to get the color under the "screensaver-layer"? Or do I have to disable the screen saver each time my program starts and enable it when exits?

    If there is no work around, can anyone give me the path to the key in the registry, that holds the data about if the screensaver is enabled or not?

  2. #2
    Join Date
    May 2007
    Location
    Sweden
    Posts
    123
    Edit: I found the registry key that holds screensaver status
    HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive

    But would be much more better with a workaround, if it is possible. Changing this key every time the application starts and ends is unsafe (if the process got killed, the screensaver will stay inactive...)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles