Results 1 to 4 of 4

Thread: Login

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2010
    Posts
    17

    Login

    Alright, So with this game I am Making with VB I am Confused on how to make the login system to make the registered user to login to his character automatically other then having to make a new character? Here is my login System code not much
    Code:
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            If TextBox1.Text = My.Settings.Username And TextBox2.Text = My.Settings.Password Then
                CharCreateForm.Show()
                Me.Hide()
            End If
        End Sub
    Last edited by Sicen; Aug 25th, 2010 at 08:49 PM.

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Login

    You obviously have to save all created usernames somewhere, then read them again on launch. Your application, by itself wont save anything unless you tell it to. You could use a text file, or a database, store it in an INI file, save it in the Registry etc etc. Search the forum (http://www.vbforums.com/search.php) for "save text file" for example and you'll get plenty of results and code on how to do it. Do similarly for "load text file". Then after you loaded the save data you can compare it to what the user enters so they don't have to recreate their account/profile each time.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2010
    Posts
    17

    Re: Login

    Alright ty dude

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Login

    Thread moved from 'VB6 and Earlier' forum to 'VB.Net' (VB2002 and later) forum

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