Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/10/2006, 00:41
Insomnia
 
Fecha de Ingreso: noviembre-2005
Mensajes: 751
Antigüedad: 18 años, 6 meses
Puntos: 13
Hola

Prueba con el siguiente ejemplo, esta sacado de la API-Guide

Código:
'In general section
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: [email protected]
    msg = MsgBox("This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbCritical + vbOKCancel + 256, App.Title)
    If msg = vbCancel Then End
    'reboot the computer
    ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
End Sub
--Saludos--