![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 25
Rep Power: 0
![]() |
Hi,
Please help! I need some code so that if someone enters a wrong password, a countdown starts from 100 that stops them from accessing that form during the countdown. (so they cant get the passsword) Also is it possible if the program exits, for the countdown to resume where the exit occured? I know it sound strange but would appreciate any suggestions ![]() |
|
|
|
|
|
#2 |
|
Expert Programmer
|
You should give it a try first, but I'm assuming there would be a time module.
|
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Take a peek at the Timer control.
|
|
|
|
|
|
#4 | |
|
Programming Guru
![]() |
Quote:
|
|
|
|
|
|
|
#5 |
|
Expert Programmer
|
This'll work inline, just add a label for the countdown.
Private Sub ShowTimeOut()
Dim PrevTime As Single
Dim TickCount As Integer
TickCount = 10
Label1.Caption = TickCount
Do
PrevTime = Timer
Do
DoEvents
Loop While (Timer - PrevTime) < 1
TickCount = TickCount - 1
Label1.Caption = TickCount
Loop While TickCount > 0
End Sub
Private Sub Form_Activate()
ShowTimeOut
MsgBox "Boom"
End SubMe.Enabled = False ShowTimeOut Me.Enabled = True |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|