Matikan mouse dan
keyboard
Public Class Form1
Private Declare Function
BlockInput Lib "user32"
_
(ByVal
fBlock As Long)
As Long
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 60
Label1.Text = 60
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'BlockInput(True)
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Label1.Text = Val(Label1.Text) - 1
If
Val(Label1.Text) = 0 Then
Timer1.Enabled = False
Label1.Text = 60
'BlockInput(False)
End If
ProgressBar1.Value = ProgressBar1.Value
+ 1
If
ProgressBar1.Value = 60 Then
Form2.ShowDialog()
End If
End Sub
Private Sub Label1_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Label1.Click
End Sub
End Class
Tidak ada komentar:
Posting Komentar