Private Declare Function ExitWindowsEx& Lib "user32" (ByVal uFlags&, ByVal dwReserved&)
Dim i As Integer
Private Sub Commad1_Click()
If Option1.Value = True Then
i = ExitWindowsEx(1, 0&) 'Apaga el equipo
End If
If Option2.Value = True Then
i = ExitWindowsEx(2, 0&) 'Reinicia el Sistema
End If
If Option3.Value = True Then
i = ExitWindowsEx(0, 0&) 'iniciar Windows con nuevo usuario
End If
End Sub