|
-
Jun 14th, 2006, 09:09 PM
#1
Thread Starter
Lively Member
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
-
Jun 14th, 2006, 09:12 PM
#2
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.
-
Jun 14th, 2006, 09:42 PM
#3
Thread Starter
Lively Member
Re: Vb6 frmlogin help
 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
-
Jun 14th, 2006, 09:55 PM
#4
Addicted Member
Re: Vb6 frmlogin help
here, you need 2 command buttons,2 labels, 2 text boxes and 2 timers
VB Code:
Private Sub Command1_Click()
If Text1 = "test" And Text2 = "text" Then
MsgBox "login"
Else
Label2 = Label2 + 1
End If
End Sub
Private Sub Timer1_Timer()
Label1 = Label1 - 1
If Label1.Caption = "0" Then
MsgBox "ok try again"
Timer1.Enabled = False
Label1.Caption = "30"
Label2.Caption = "0"
Command1.Enabled = True
Else
End If
End Sub
Private Sub Timer2_Timer()
If Label2 = "3" Then
Timer1.Enabled = True
Command1.Enabled = False
End If
End Sub
If this post has helped you please rate it by clicking the scales to the left of this post!
-
Jun 14th, 2006, 11:16 PM
#5
Thread Starter
Lively Member
Re: Vb6 frmlogin help
Do i create a standard exe. then put it in or do i then select new from and login dialog?
-
Jun 14th, 2006, 11:34 PM
#6
Addicted Member
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!
-
Jun 16th, 2006, 01:58 AM
#7
Thread Starter
Lively Member
Re: Vb6 frmlogin help
Okay thanks alot. I got it to work
-
Jun 16th, 2006, 02:24 PM
#8
Thread Starter
Lively Member
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.
-
Jun 16th, 2006, 03:06 PM
#9
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
-
Jun 16th, 2006, 04:15 PM
#10
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|