Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal hWnd As Intptr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Int32) As Integer
Const SC_MONITORPOWER As Integer = &HF170
Const MONITOR_ON As Short = -1
Const MONITOR_OFF As Short = 2
Const WM_SYSCOMMAND As Short = &H112S
SendMessage([COLOR=red]HANDLE TO THE MAIN FORM GOES HERE[/COLOR], WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF)