VisualBasic Chay Nguoc thoi gian
Dim i As Long
----------------------
Private Sub cmdend_Click()
Command1.Visible = True
cmdend.Visible = False
End Sub
-----------------------
Private Sub Command1_Click()
Timer1.Interval = 1000
End Sub
-----------------------
Private Sub Timer1_Timer()
Dim a As Integer
a = 100
'qua trinh dang nhap
Command1.Visible = False
cmdend.Visible = True
If txtid = "admin" And txtpass = "123456" Then
lblid.Visible = False
lblpass.Visible = False
txtid.Visible = False
txtpass.Visible = False
txttg.Visible = True
'khai bao ID
ElseIf txtid <> "admin" Then
Timer1.Interval = 0
MsgBox "Ban da nhap sai ID", vbApplicationModal, "Thong Bao"
'Khai bao PASS
ElseIf txtpass <> "123456" Then
Timer1.Interval = 0
MsgBox "Ban da nhap sai PASS", vbApplicationModal, "Thong Bao"
Else
Timer1.Interval = 0
MsgBox "Sai Hoan Toan"
End If
' qua trinh the hien
txttg.Text = Val(a) - i & " % "
i = i + 1
If Val(txttg.Text) = "0" Then
Timer1.Interval = 0
txttg.Visible = False
lbltb.Visible = True
lbltb.Caption = "Loading..."
End If
End Sub
Link Download
PASS:hoanggialongit