Can someone tell me the code that will restart windows when I click the button I made in VB.Thank you
Printable View
Can someone tell me the code that will restart windows when I click the button I made in VB.Thank you
Try this:
Code:Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Const EWX_REBOOT = &H2
Private Sub Command1_Click()
ExitWindowsEx EWX_REBOOT, 0
End Sub