Home All Groups Group Topic Archive Search About
Author
4 Feb 2006 10:04 AM
william
Is there a functions that will shut off the monitor the way windows
does under its power schme?

Is there a way to wake a computers who's screen saver is on?

Author
4 Feb 2006 4:40 PM
Veign
Wake a computer from a screensaver (should be easy enough to translate to
VB):
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q140723

Thread discussing it with code samples:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21179490.html

Put you computer in Power Saver mode (from
http://www.thescarms.com/vbasic/tips.asp):
To turn off the monitor:

    SendMessage(AnyForm.hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, 2&)

Standby  monitor:

    SendMessage(AnyForm.hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, 1&)

To turn on the monitor:

    SendMessage(AnyForm.hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, -1&)

Where

    Const WM_SYSCOMMAND = &H112
    Const SC_MONITORPOWER= &HF170


--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


<will***@aol.com> wrote in message
Show quoteHide quote
news:ctu8u1lfgu4303186hak0rlhfmhef2a5bi@4ax.com...
> Is there a functions that will shut off the monitor the way windows
> does under its power schme?
>
> Is there a way to wake a computers who's screen saver is on?
>
>
>
>
>
Author
5 Feb 2006 4:24 AM
wagon
THANKS

Show quoteHide quote
On Sat, 4 Feb 2006 11:40:54 -0500, "Veign" <NOSPAMinveign@veign.com>
wrote:

>Wake a computer from a screensaver (should be easy enough to translate to
>VB):
>http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q140723
>
>Thread discussing it with code samples:
>http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21179490.html
>
>Put you computer in Power Saver mode (from
>http://www.thescarms.com/vbasic/tips.asp):
>To turn off the monitor:
>
>    SendMessage(AnyForm.hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, 2&)
>
>Standby  monitor:
>
>    SendMessage(AnyForm.hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, 1&)
>
>To turn on the monitor:
>
>    SendMessage(AnyForm.hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, -1&)
>
>Where
>
>    Const WM_SYSCOMMAND = &H112
>    Const SC_MONITORPOWER= &HF170
>
>
>--
>Chris Hanscom - Microsoft MVP (VB)
>Veign's Resource Center
>http://www.veign.com/vrc_main.asp
>Veign's Blog
>http://www.veign.com/blog