Hello Everyone this is The application using vb.net "Turn Off PC"
This is Coding:
Public Class Form1
Private Sub cmds_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmds.Click
System.Diagnostics.Process.Start("Shutdown", "/s") 'to shutdown
End Sub
Private Sub cmdl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdl.Click
System.Diagnostics.Process.Start("Shutdown", "/l") 'to logoff
End Sub
Private Sub cmdr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdr.Click
System.Diagnostics.Process.Start("Shutdown", "/r") 'to restart
End Sub
Private Sub cmda_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmda.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cmds.Focus()
End Sub
End Class
Public Class Form1
Private Sub cmds_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmds.Click
System.Diagnostics.Process.Start("Shutdown", "/s") 'to shutdown
End Sub
Private Sub cmdl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdl.Click
System.Diagnostics.Process.Start("Shutdown", "/l") 'to logoff
End Sub
Private Sub cmdr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdr.Click
System.Diagnostics.Process.Start("Shutdown", "/r") 'to restart
End Sub
Private Sub cmda_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmda.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cmds.Focus()
End Sub
End Class
0 comments:
Post a Comment