Ads 468x60px

Selasa, 30 April 2013

Program Mematikan Komputer Dengan Mengatur Waktu Kapan Akan Mematikan Komputer Pada Visual Studio 2010

Source Kode:
Private Sub btnEnabled_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnabled.Click
        If btnEnabled.Text = "Disabled" Then
            DtTime.Enabled = False
            btnEnabled.Text = "Enabled"
            TimerShutDown.Enabled = True
        Else
            DtTime.Enabled = True
            btnEnabled.Text = "Disabled"
            TimerShutDown.Enabled = False
        End If
    End Sub

      
Private Sub btnHide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHide.Click
        Me.Opacity = 0%
        Me.ShowInTaskbar = False
    End Sub
      
Private Sub TimerShutDown_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerShutDown.Tick
        Dim P_Time As String
        P_Time = Format(TimeOfDay, "hh:mm tt")
        Try
            If P_Time = Trim(DtTime.Text) Then
                System.Diagnostics.Process.Start("Shutdown", "/s") ' Untuk shutdown
                ' System.Diagnostics.Process.Start("Shutdown", "/r") 'Untuk Restart
                ' System.Diagnostics.Process.Start("Shutdown", "/l") ' Untuk logoff
                ' System.Diagnostics.Process.Start("Shutdown", "/a") ' untuk abort
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub



Download Tutorial Lengkapnya:

Artikel Lain:

Artikel :
Semoga Bermanfaat! Mohon Di Like FanPage-nya Ya! Thanks.

0 Komentar: