Results 1 to 3 of 3

Thread: Basic Login System

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    493

    Arrow Basic Login System

    Here is a Quick tutorial on how to make a Login System...

    HOW TO:

    1) Create a project and name it whatever you want...

    2) Create A Button and a Textbox...

    3) View the code on your Button and put...
    Code:
            If Not TextBox1.Text = "VB6Learner" Then
                MsgBox("Invalid Password")
            End If
            If TextBox1.Text = "VB6Learner" Then
                LoggedIn.ShowDialog()
            End If
    4) Thats all!

    This is very easy and can be done within a minute lol...
    I thought I should just give this for all the beginners and all the people that might of just wanted to know how to do this! I added A little extra in the Logged in form nothing that special tho...
    Attached Files Attached Files

  2. #2
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Basic Login System

    Why do you have two if statements? Logically you should use the else clause:
    Code:
    If TextBox1.Text = "VB6Learner" Then
        LoggedIn.ShowDialog()
    Else
        MsgBox("Invalid Password")
    End If
    I also doubt anyone would actually hard code the password either. Usually PW's are stored in encrypted files or in a secure DB.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    493

    Re: Basic Login System

    Ya I just wanted to basically tell about the If Code this is mainly for beginners so I thought they better learn the long way so they can understand it a bit better and hopefully learn your way to!

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