Re: I need help with a login form too

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: carr4895 (CARR4895_at_YAHOO.COM)
Date: 03/07/04


Date: 7 Mar 2004 14:29:46 -0800

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" <gee@iamtiredofspam.com> wrote in message news:<e4VBLovAEHA.2444@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" <CARR4895@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



Relevant Pages

  • Re: I need help with a login form too
    ... We do not care about what sex you are. ... I was having trouble with cut, copy, and paste too but I am ... > Then unload me part was confusing me. ... >>> display an appropriate message. ...
    (microsoft.public.dotnet.languages.vb)
  • [opensuse] Re: opensuse
    ... the greeter is the login dialog, i.e., the part of KDM ... # Every display has a display name, which consists of a host name ... # Specify a file with X-resources for the greeter, ... # The font used for the "Login Failed" message. ...
    (SuSE)
  • sun ray server 2.0
    ... I have sun Rays and they do not display the login screen. ... # To specify the system env vars to be exported to the users session ... # The following entries are dynamically created by Sun Ray. ...
    (comp.sys.sun.admin)
  • Re: telnet logins
    ... >> or when starting X windows. ... >> So you're already having to set up your DISPLAY variable. ... The telnet protocol allows clients to send environment variable settings ... Changing your PATH in a login file is a standard configuration ...
    (comp.unix.solaris)
  • X server appears mishap
    ... I am having trouble with the display. ... The display presents error or informational dialogs. ... I'm human and live, life doesn't always involve computing, bear with me, please? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)