Monitor On/off

Top  Previous  Next

                               

!**************************************

! Name: Turn monitor on and off standby

! Description:This code makes the monitor standby on/off.

! By: Niel Corns

!

! Side Effects:Umm....it can be a pain to turn the monitor on standby and not be able to get back into windows ;-)

!

!This code is copyrighted and has! limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=117&lngWId=7!for details.!**************************************

 

This code turns the monitor ON. Put this code into a button etc...:

SendMessage(Application.Handle, wm_SysCommand, SC_MonitorPower, -1) ;

 

This code turns the monitor into standby mode!:

SendMessage(Application.Handle, wm_SysCommand, SC_MonitorPower, 0) ;