Results 1 to 2 of 2

Thread: Activating screensaver (power off screen)

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2
    Is there af way to power off a monitor (energy save) form VB?

    I would the screen to 'go black/switch off' when a form is empty, and back on when there is something on the form.

    Best wishes
    Jakob

  2. #2
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Yes, SetSystemPowerState does the thing:

    Code:
    Public Declare Function SetSystemPowerState Lib "kernel32" (ByVal fSuspend As Long, ByVal fForce As Long) As Long
    ...
    SetSystemPowerState(1, 0) 'Power down with prompt
    ...
    SetSystemPowerState(1, 1) 'Power down without prompting
    It could take some time to recover from power-down to normal state.

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