Just use this:
Private Sub btnShutdown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShutdown.Click
System.Diagnostics.Process.Start("shutdown", "-s -t 00")
'This will make the computer Shutdown
End Sub
Private Sub btnRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestart.Click
System.Diagnostics.Process.Start("shutdown", "-r -t 00")
'This will make the computer Restart
End Sub
Private Sub btnLogOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogOff.Click
System.Diagnostics.Process.Start("shutdown", "-l -t 00")
'This will make the computer Log Off
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
'This will make the program to terminate(end the program)
End Sub
Change "00" to "1000" , and it will execute your command after 1 minute
Private Sub btnShutdown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShutdown.Click
System.Diagnostics.Process.Start("shutdown", "-s -t 00")
'This will make the computer Shutdown
End Sub
Private Sub btnRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRestart.Click
System.Diagnostics.Process.Start("shutdown", "-r -t 00")
'This will make the computer Restart
End Sub
Private Sub btnLogOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogOff.Click
System.Diagnostics.Process.Start("shutdown", "-l -t 00")
'This will make the computer Log Off
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End
'This will make the program to terminate(end the program)
End Sub
Change "00" to "1000" , and it will execute your command after 1 minute