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
Printable View
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
Yes, SetSystemPowerState does the thing:
It could take some time to recover from power-down to normal state.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