Page 1 of 1

Login with Combobox and Multiple Users

Posted: Tue Aug 18, 2009 11:56 am
by hungryhounduk
Hi All
Here is another very simple Tutorial on how to add a Login page to your applications and use a Combobox to add as may people as you like with different passwords. This can be usefull if you are designing something for multiple users.

The code goes on the Enter Button
Code: Select all
If ComboBox1.SelectedItem = "David Hurst" And TextBox1.Text = "admin" Then
            MsgBox("Welcome David")
            Me.Hide()
            Form2.Show()
        End If
        If ComboBox1.SelectedItem = "Mike Freder" And TextBox1.Text = "Coder" Then
            MsgBox("Welcome Mike")
            Me.Hide()
            Form3.Show()
        End If
        If ComboBox1.SelectedItem = "Gary Wilkinson" And TextBox1.Text = "Tech Help" Then
            MsgBox("Welcome Gary")
            Me.Hide()
            Form4.Show()
        End If
        If ComboBox1.SelectedItem = "Mary Tyler" And TextBox1.Text = "Payroll" Then
            MsgBox("Welcome Mary")
            Me.Hide()
            Form5.Show()
        End If
        If ComboBox1.SelectedItem = "Rachel Weise" And TextBox1.Text = "Management" Then
            MsgBox("Welcome Rachel")
            Me.Hide()
            Form6.Show()
        End If
I'm sure this could be adapted for use for .Net applications as well.
I have used 5 names in my Combobox Example ( which you add in the Properties in the Collections tab)
and 1 textbox
and 6 forms ( each form links to Name that is selected )
and 1 button
But you can adapt it to suit yourselves.
Image

Image

Image

Image

Hope this is usefull to you all.

Chris

Re: Login with Combobox and Multiple Users

Posted: Fri Sep 04, 2009 2:41 am
by Cali Alec
Is it necessary to have your address in the credits? omg;

Re: Login with Combobox and Multiple Users

Posted: Fri Sep 04, 2009 3:03 am
by hungryhounduk
Hi Cali
Its a Fictitious Name :lol: But you are willing to call me or email me at the address if you like :P

Re: Login with Combobox and Multiple Users

Posted: Fri Sep 18, 2009 5:25 pm
by CodemaN
great program!!!!

Re: Login with Combobox and Multiple Users

Posted: Sat Jan 23, 2010 7:46 am
by Usman55
Nice one! But everyone can crack the password easily!

Re: Login with Combobox and Multiple Users

Posted: Sat Feb 20, 2010 7:42 am
by hungryhounduk
Nice one! But everyone can crack the password easily!
"Is that so"

Please POST a TUTORIAL on How YOU can Stop People Cracking it ;)

Re: Login with Combobox and Multiple Users

Posted: Mon Mar 08, 2010 9:47 pm
by zachman61
hungryhounduk wrote:
Nice one! But everyone can crack the password easily!
"Is that so"

Please POST a TUTORIAL on How YOU can Stop People Cracking it ;)
or better yet show how they crack it

Re: Login with Combobox and Multiple Users

Posted: Mon Mar 15, 2010 7:49 pm
by hungryhounduk
or better yet show how they crack it
mmm Sorry not on this Site ( read the Forum Rules) cooll;

Re: Login with Combobox and Multiple Users

Posted: Tue Mar 16, 2010 2:22 am
by 35000vr
Cool.But I already knew this.