انا اريد اغلاق الجهاز
شفت كود لعمل restart لكن احتاج لاغلاقه
انظروا هل هذا الكود هو المطلوب :
Public Declare Function ExitWindowsEx& Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) Public Const EWX_LOGOFF = 0 Public Const EWX_SHUTDOWN = 1 Public Const EWX_REBOOT = 2 Public Const EWX_FORCE = 4 Public Sub ExitWindows(bytCloseType As Byte) If ExitWindowsEx(bytCloseType, 0) = 0 Then ' Insert Error handling code here Else End End If End Sub
جربته لكن لم ارى شيئا يحدث

