Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 4th, 2005, 2:37 PM   #1
fox123
Newbie
 
Join Date: Mar 2005
Posts: 25
Rep Power: 0 fox123 is on a distinguished road
Red face Password Expiry / Lock

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
fox123 is offline   Reply With Quote
Old Apr 4th, 2005, 3:30 PM   #2
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 707
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
You should give it a try first, but I'm assuming there would be a time module.
thechristelegacy is offline   Reply With Quote
Old Apr 4th, 2005, 3:43 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Take a peek at the Timer control.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 4th, 2005, 4:18 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Quote:
that form during the countdown. (so they cant get the passsword)
The correct password shouldn't be in a form in the first place, it should be a variable (preferably hashed) inside of your program. Only what the user enters should be in a password field!
tempest is offline   Reply With Quote
Old Apr 4th, 2005, 8:03 PM   #5
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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 Sub
Obviously you'd actually put:
Me.Enabled = False
ShowTimeOut
Me.Enabled = True
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:07 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC