Results 1 to 10 of 10

Thread: Vb6 frmlogin help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    98

    Vb6 frmlogin help

    Hey im having trouble with a frmlogin for VB6. I have my password and everthing set up but i want to have a timer on it so after 30 mins if the password isnt in correctly a message displays along with a wav. file that is played. Also is it possible so nothing else can be done without typing the password in ( meaning you cant open other files and things.) if not then thats fine i just want the timer to work. Thanks

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Vb6 frmlogin help

    Welcome to the Forums Esand15

    30 minutes! is that a typo and should be 30 seconds?

    If it is 30 minutes, why so long?

    What about getting say 5 attempts to login before the app unloads etc.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    98

    Re: Vb6 frmlogin help

    Quote Originally Posted by Bruce Fox
    Welcome to the Forums Esand15

    30 minutes! is that a typo and should be 30 seconds?

    If it is 30 minutes, why so long?

    What about getting say 5 attempts to login before the app unloads etc.

    Thanks, Yeah it was a typo lol. But instead can i have it 3 attempts, i never thought of doing it like that. So there would be a label saying how many times you have left and everytime you put an incorrect password in it gives a message as long as playing a wav. file. (if the wav. file will take you to much time then dont worry about it, If it is possible.) But if dont get it the first 3 times you have to wait 30secs. Thanks for the help

  4. #4
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Vb6 frmlogin help

    here, you need 2 command buttons,2 labels, 2 text boxes and 2 timers

    VB Code:
    1. Private Sub Command1_Click()
    2. If Text1 = "test" And Text2 = "text" Then
    3. MsgBox "login"
    4. Else
    5. Label2 = Label2 + 1
    6. End If
    7.  
    8. End Sub
    9.  
    10. Private Sub Timer1_Timer()
    11.  
    12. Label1 = Label1 - 1
    13. If Label1.Caption = "0" Then
    14. MsgBox "ok try again"
    15. Timer1.Enabled = False
    16. Label1.Caption = "30"
    17. Label2.Caption = "0"
    18. Command1.Enabled = True
    19. Else
    20. End If
    21.  
    22.  
    23. End Sub
    24.  
    25. Private Sub Timer2_Timer()
    26. If Label2 = "3" Then
    27. Timer1.Enabled = True
    28. Command1.Enabled = False
    29. End If
    30.  
    31. End Sub
    If this post has helped you please rate it by clicking the scales to the left of this post!

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    98

    Re: Vb6 frmlogin help

    Do i create a standard exe. then put it in or do i then select new from and login dialog?

  6. #6
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Vb6 frmlogin help

    just create a new standard project and then put the controls that I listed above. Double click one of the controls, highlight all the text you see and then paste what I have listed above. You then need to set the two label captions to 0 (in the properties menu)
    If this post has helped you please rate it by clicking the scales to the left of this post!

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    98

    Re: Vb6 frmlogin help

    Okay thanks alot. I got it to work

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jun 2006
    Posts
    98

    Re: Vb6 frmlogin help

    Ok I need one more thing. How do i get the message box that appears bigger, and the textin it bigger? Sorry for the double post.

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Vb6 frmlogin help

    Use a form, put labels and command buttons on it and set the font size for the labels. Or look for posts on subclassing messageboxes, which is a lot more difficult.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  10. #10
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Vb6 frmlogin help

    i think it would be easier to make a new form and put it how you want it, then where it says msgbox "whatever" , change that line to form2.show
    If this post has helped you please rate it by clicking the scales to the left of this post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width