Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/12/2009, 15:57
Avatar de tepitenio
tepitenio
 
Fecha de Ingreso: noviembre-2008
Mensajes: 1.188
Antigüedad: 15 años, 6 meses
Puntos: 88
Respuesta: Reiniciar o apagar pc forzadamente

Se me ocurre que lo que quieres es que no se detenga a salvar archivos. Pues el siguiente codigo puede ayudarte:

Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EWX_FORCE = 4
Private Const EWX_LOGOFF = 0
Private Const EWX_REBOOT = 2
Private Const EWX_SHUTDOWN = 1

Private Sub cmdShutDown()
ExitWindowsEx EWX_SHUTDOWN, 0
End Sub


Creo que para forzar el cierre CAIGA QUIEN CAIGA, debes usar el FORCE como parametro.
__________________
Tepi
(Si te gusto mi opinion... por que no me das karma???)