Shutdown Manager
Submitted by donbermoy on Tuesday, March 11, 2014 - 18:48.
We always used our computer system program to shutdwon, log-off, and restart our pc. But here in vb.net we can also do that.
Now, let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add three buttons named Button1 labeled as "Shutdown", Button2 labeled as "Logoff", and Button3 labeled as "Restart". You must design your layout like this:
3. Now put this code for your code module.

- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Shell("shutdown -s -t 10 -c computer,will,shutdown,after,10,seconds")
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Shell("shutdown -l -t 10 -c computer,will,log-off,after,10,seconds")
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Shell("shutdown -r -t 10 -c computer,will,restart,after,10,seconds")
- End Sub
- End Class