Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

turning the screen off

Status
Not open for further replies.

hankins

Programmer
Jul 17, 2001
22
GB
does anyon1 know the vb6 command that makes the screen turn off (goin to susspend mode, or just go black) if so can u tell me how pls
thanx
 
Going into suspend mode is easy:

Private Declare Function SetSystemPowerState Lib "kernel32" (ByVal fSuspend As Long, ByVal fForce As Long) As Long

Call SetSystemPowerState(True, True)

WARNING: Any power-managed devices will be shut down by this method, e.g. any USB device that is drawing power from the USB port...
 
thanx 4 that strongm, but could u please give me some more information about how i do that and how 2 set itup thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top