12-30-2011، 03:29 PM
کد:
'=========================================================================
' =========== Paste the lines below into a standard module ===============
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
Const SC_MONITORPOWER = &HF170&
Const MON_OFF = 2&
Const WM_SYSCOMMAND = &H112
Private Sub procTurnOff()
SendMessage Me.hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, MON_OFF
End Sub
'Now you can call the above procedure using a command button , say cmdTurnOff
'==============Add this code to the command button=======================
Private Sub cmdTurnOff_Click()
Call procTurnOff
End Sub
'====================End=================================================
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg