Results 1 to 3 of 3

Thread: Detecting when a monitor goes into energy saving mode.

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    1
    If you have the energy saving features for a monitor turned on under Display properties, is there anyway of detecting when the monitor is powered down? and then told to wake up?

    thanks

    Das Shrubber

  2. #2
    Lively Member TB's Avatar
    Join Date
    Feb 2001
    Location
    Austria
    Posts
    106

    Unhappy

    Hello!

    A few days ago I wanted to make such a program,
    which turns the PC into Stand-by mode, and leave this automatically.
    But I found out that any progress, even Timer events, is stopped during this mode.
    Maybe there is a way to check this mode, but I don't think so.
    mojo

  3. #3
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    Using the SystemParametersInfo Function, you can get wether the screensaver is on, wether powersave(montior) is enabled, and what the powersave timeout is. use these Flags(from msdn):
    SPI_GETPOWEROFFACTIVE Determines whether the power-off phase of screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE if disabled.
    Windows 98: This flag is supported for 16-bit and 32-bit applications.

    Windows 95: This flag is supported for 16-bit applications only.

    Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications.

    SPI_GETPOWEROFFTIMEOUT Retrieves the time-out value for the power-off phase of screen saving. The pvParam parameter must point to an integer variable that receives the value.
    Windows 98: This flag is supported for 16-bit and 32-bit applications.

    Windows 95: This flag is supported for 16-bit applications only.

    Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications.

    SPI_GETSCREENSAVEACTIVE Determines whether screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if screen saving is enabled, or FALSE otherwise.
    SPI_GETSCREENSAVERRUNNING Windows NT 5.0 and later, Windows 98: Determines whether a screen saver is currently running on the window station of the calling process. The pvParam parameter must point to a BOOL variable that receives TRUE if a screen saver is currently running, or FALSE otherwise. Note that only the interactive window station, "WinSta0", can have a screen saver running.
    SPI_GETSCREENSAVETIMEOUT Retrieves the screen saver time-out value, in seconds. The pvParam parameter must point to an integer variable that receives the value.
    they are not exactly what you want, but they might help
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

Posting Permissions

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



Click Here to Expand Forum to Full Width