Bueno, es facil tan solo con buscar hubieras encontrado enseguida como hacerlo. Igualmente por esta vez te doy el codigo hecho.
En un form pon un timer y un textbox.
'######################################
'# Zion_Tm ©® #
'# Demo Bomba de Tiempo #
'# Off Pc #
'######################################
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
Option Explicit
Dim TimeResto As Long
Dim frmContador As Object
Private Sub Form_Resize()
TimeResto = 10
Timer1_Timer
End Sub
Private Sub Timer1_Timer()
Dim Horas As Integer, Minutos As Integer, Segundos As Integer, Cadena As String
Segundos = TimeResto
Horas = Int(Segundos / 3600)
Segundos = Segundos Mod 3600
Minutos = Int(Segundos / 60)
Segundos = Segundos Mod 60
Cadena = Format$(Segundos, "00")
Text1.Text = Cadena
TimeResto = TimeResto - 1
If TimeResto = -1 Then Form_Unload (True)
If Val(Text1.Text) = "00" Then
Var& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
MsgBox " Aqui explota la bomba Creada por Zion_Tm ©® "
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
Set frmContador = Nothing
End Sub
Suerte amigo, investigas un poco mas que hay mas cosas para meterle a este code.
saludos
Zion_Tm
