Posts Subscribe to This BlogComments

Follow Us

New Articles

1 2 3 4 5
Photobucket Disini kalian dapat merequest Software, Game, Pembuatan gambar 3dimensi AUTOCAD dan ANIMASI 3DSMAX ataupun Share Solution of Computer

Jumat, 26 November 2010

Shut Down , Log Off dan Restart dengan VB

Buat 3 buah command dan beri nama command tersebut:
cmdLogOff,cmdRestart,cmdShutdown
dan ketik source code dibawah ini:


Private Sub cmdLogOff_Click()
'Log off windows XP
Shell "shutdown -l -f -t 0"
End Sub
Private Sub cmdRestart_click()
Shell "shutdown -r -f -t 0"
End Sub
Private Sub cmdShutdown_click()
Shell "shutdown -s -f -t 0"
End Sub
Private Sub Timer1_Timer()
If Label1.Visible = False Then
Label1.Visible = True
ElseIf Label1.Visible = True Then
Label1.Visible = False
End If
End Sub
Private Sub Timer2_Timer()
Label2.Left = Label2.Left + 200
If Label2.Left > 7180 Then
Label2.Left = 0
End If
End Sub
Private Sub Timer3_Timer()
Label3.Left = Label3.Left + 200
If Label3.Left > 7180 Then
Label3.Left = 0
End If
End Sub



Related Post



0 komentar: