I just needed help. I am so sorry for asking and for putting the
whole thing in. I am usually good at this kind of stuff but the
password part was hard for me. That is what i was having trouble
with. So don't critize mem. I am a good person. And I am not a guy
either. I was having trouble with cut, copy, and paste too but I am
not going to ask for any help. I was also going to have you look at
my slot machine game because i thought it would be cool for you people
to see it, but not anymore. Here is what I had before I even posted
the question.
Thanks
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOK.Click
Dim strCapPass As String
'This line makes sure a User Name is entered.
'If not, it displays a message and exits the procedure.
If txtUserName.Text = "" Then
Unload.Me()
Else
MessageBox.Show("Must Enter User Name!", "Login")
txtUserName.Focus()
End If
'This line changes this text to capital letters
strCapPass = UCase(txtPassword.Text)
'This select statement checks the password
Select Case strCapPass
Case "IT160"
Unload(Me)
Case "VB2MANAGER"
Unload(Me)
Case "BACKDOOR"
Unload(Me)
Case Else
'Count how many times there is an invalid password
mintInvalPass = mintInvalPass + 1
'if there is less than three display the message
If mintInvalPass < 3 Then
MessageBox.Show("Invalid Password, try again!",
"Login")
'This line set the cursor in the txtPassword
textbox
txtPassword.Focus()
Else
'if there is more than three display sorry message
MessageBox.Show("Sorry, You Only get Three Trys!",
"Login")
End
End If
End Select
End Sub
I just had trouble converting it to VB.NET. Oh well.
Bye.
Then unload me part was confusing me.
"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message news:<e4**************@TK2MSFTNGP10.phx.gbl>...
You forgot to include the e-mail address of your instructor... or will you
handle the part where you turn it in for a grade?
Is there any part of the lesson which you are not confused about? We could
build from there unless you just want the A+ and prefer to skip the coding
part of things?
"carr4895" <CA******@YAHOO.COM> wrote... Hello.
I was wondering if someone could help me too with a login form. Upon
startup, I have to display a password screen and it should accept a
user name and password. User name can be anything non-blank. If
there is no user name, an appropriate error message must be displayed.
All of the following passwords are valid IT160, VB2Manager, BackDoor.
No other password is valid. It must allow the user to enter the
password in any case. If an invalid password is enterd, i need to
display an appropriate message. If no password is entered or if the
password is incorrect after three tries, display a sorry message and
exit the program. I am using VB.Net and it is an MDI form. Ineed to
display the password screen then the splash screen and the the parent
form. Please help. I am so confused. Thanks