Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Password Problems in VB6


Password Problems in VB6

Reply
  #1 (permalink)  
Old 03-27-06, 09:50 AM
iceiceady iceiceady is offline
Newbie Coder
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Password Problems in VB6

I had two problems with my password program.

Firstly when I enter the correct password it opens the next form as expected using a hide and show.

Now my problem is that if I go back to the main menu from this form and go back into my password program then you don't have to type in the password to enter the program.

What I need is some way of refreshing the form so whenever you go onto the password form it asks for the password.

Here is my code:

Private Sub TxtPassword_Validate(Cancel As Boolean)
Cancel = False
If TxtPassword.Text <> "teacher" Then
MsgBox "Invalid Password - please re-enter", vbOKOnly
Cancel = True
CmdOK.SetFocus
TxtPassword.SetFocus
End If

End Sub


The second problem that I have is with a quit button I have on the same page. So if the person has clicked the wrong button and wants to go back to the main menu they can.

The problem is that at the moment if I click the quit button is says "Invalid Password - please re-enter". If you put the password in it will them do it, but as you can imagine I want it to word correctly.

I think I'm missing something from my coding to allow me to do this.

Any help with these problems would be much appreciated.
Reply With Quote
  #2 (permalink)  
Old 03-27-06, 10:13 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
The easiest way to have all those fixed is for you to put the whole project in a zip file and post it here. I can take a look at it for you and fix what needs fixing.
__________________
Reply With Quote
  #3 (permalink)  
Old 03-27-06, 10:36 AM
iceiceady iceiceady is offline
Newbie Coder
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by digioz
The easiest way to have all those fixed is for you to put the whole project in a zip file and post it here. I can take a look at it for you and fix what needs fixing.
Ok mate done.

I also have a problem with my FrmStudent in that I want to add a countdown timer onto the form, but because I have a scroll bar it keeps coming up with an error.

I have also attached the timer I have put together.

Thanks mate.
Reply With Quote
  #4 (permalink)  
Old 03-27-06, 03:04 PM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Here you go bud. I added a global module to your project and set a global boolean variable in there to keep track of when a user is logged in or not. Take a look and see if the program is now behaving the way you wanted to. Best of Luck.


Pete
Attached Files
File Type: zip Quiz_Setter_Setup.zip (45.6 KB, 226 views)
__________________
Reply With Quote
  #5 (permalink)  
Old 03-27-06, 03:16 PM
iceiceady iceiceady is offline
Newbie Coder
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by digioz
Here you go bud. I added a global module to your project and set a global boolean variable in there to keep track of when a user is logged in or not. Take a look and see if the program is now behaving the way you wanted to. Best of Luck.


Pete
Thats great mate, works a treat.

Have you got any ideas with the timer problem? Like I say it just won't seem to work with the scroll bar.
Reply With Quote
  #6 (permalink)  
Old 03-27-06, 03:32 PM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
I didn't have a chance to look at the timer issue. Maybe if you haven't figured it by tonight, I will take a look at it after work.

Gives you a little something to work on until then .... lol


Pete
__________________
Reply With Quote
  #7 (permalink)  
Old 03-28-06, 03:17 PM
iceiceady iceiceady is offline
Newbie Coder
 
Join Date: Mar 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by digioz
I didn't have a chance to look at the timer issue. Maybe if you haven't figured it by tonight, I will take a look at it after work.

Gives you a little something to work on until then .... lol


Pete
Hey Mate, still having no joy with that timer problem on the FrmStudent. I can't work out the problem, I just know that it won't work with the scroll bar.
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Password problems dodotopia PHP 2 02-03-06 08:34 AM
Password not going through FiRe Visual Basic 2 12-02-04 09:53 AM
Need To Password Protect a Page For Multi-Users cebuy PHP 8 09-09-04 07:57 AM
more problems with redirect ksroadrunner13 PHP 5 03-26-04 03:29 PM


All times are GMT -5. The time now is 01:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.