دكمه نداره، اما اميدوارم به درد بخوره:
کد:
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Function GetWinFolder() As String
Dim Path As String, strSave As String
strSave = String(200, Chr$(0))
GetWinFolder = Left$(strSave, GetWindowsDirectory(strSave, Len(strSave))) + "\"
End Function
Private Sub Form_Load()
Shell GetWinFolder + "system32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0"
End Sub
اين دو رو هم مىتونى تست كنى:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=56040&lngWId=1
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=53118&lngWId=1
◙