VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

How to turn the monitor on/off

gunti  (6 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

With this code you can turn on or off the monitor ;)

API Declarations
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_SYSCOMMAND = &H112
Private Const SC_MONITORPOWER = &HF170

Rate How to turn the monitor on/off (5(5 Vote))
How to turn the monitor on/off.bas

How to turn the monitor on/off Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters