First attempt at login system.

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Account Upgraded | Title Enabled! patrickisit is offline
    MemberRank
    Feb 2009 Join Date
    Birmingham, EngLocation
    414Posts

    First attempt at login system.

    Download here;; http://www.patcamp.co.uk/simple%20login%20system.rar

    Screenshots;


    Form1 Code;
    Code:
    Public Class Form1
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Me.Close()
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            On Error GoTo A
            Dim Username As New System.IO.StreamReader(CurDir() & "/" & TextBox1.Text & ".txt")
            Dim Username2, Password As String
            Username2 = Username.ReadLine()
            Password = Username.ReadLine()
            Username.Close()
            If Password = TextBox2.Text Then
                MsgBox("Welcome" & " " & Username2)
            Else
                MsgBox("Wrong Password!")
            End If
            Exit Sub
    A:
            MsgBox("User does not exist!")
        End Sub
    
        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            Form2.Show()
            Me.Close()
        End Sub
    End Class
    Form2 Code;
    Code:
    Imports System
    Imports System.IO
    Imports System.Text
    
    Public Class Form2
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            On Error GoTo A
            Dim stream_writer As New StreamWriter(CurDir() & "/" & TextBox1.Text & ".txt")
            Dim password1 As String
            Dim password2 As String
            Dim Username As String
            Username = TextBox1.Text
            password1 = TextBox2.Text
            password2 = TextBox3.Text
    
            If password1 & password2 = "" Then
                MsgBox("Please enter a password")
            End If
            If Username = "" Then
                MsgBox("Please enter a username")
                GoTo A
            End If
    
            If password1 = password2 Then
                stream_writer.WriteLine(TextBox1.Text)
                stream_writer.WriteLine(TextBox2.Text)
                stream_writer.Close()
                MsgBox("User Created!")
                Form1.Show()
                Me.Close()
            Else
                MsgBox("Passwords do not match!")
            End If
    A:
        End Sub
    End Class


  2. #2
    Banned Monsta. is offline
    BannedRank
    Jun 2008 Join Date
    England - MerseLocation
    1,221Posts

    Re: First attempt at login system.

    Good work.

    That GUI is nice, but please make that label transparent.

  3. #3
    Most Handsome jcgo16 is offline
    MemberRank
    Apr 2007 Join Date
    232Posts

    Re: First attempt at login system.

    wow that was nice
    thanks for that, so cute, and u can use themes on vb
    how did u do that

  4. #4
    Account Upgraded | Title Enabled! patrickisit is offline
    MemberRank
    Feb 2009 Join Date
    Birmingham, EngLocation
    414Posts

    Re: First attempt at login system.

    @Monsta.
    The label wont go transparent over an picturuebox for some reason.
    It was only there so I knew which test it was anyways.

    @jcgo16
    How did I do what?
    I don't usnderstand the question excatly.

  5. #5
    Most Handsome jcgo16 is offline
    MemberRank
    Apr 2007 Join Date
    232Posts

    Re: First attempt at login system.

    are u using vb2008?
    or vb6?

    if ur using vb6, how did u do that theming the form

  6. #6
    Account Upgraded | Title Enabled! patrickisit is offline
    MemberRank
    Feb 2009 Join Date
    Birmingham, EngLocation
    414Posts

    Re: First attempt at login system.

    I'm using VB2008.

    + I didnt use theming, its just a picture in a picturebox.

  7. #7
    Om Nom Nom Nom Jeffijoe is offline
    MemberRank
    Jun 2008 Join Date
    CodeGear DelphiLocation
    364Posts

    Re: First attempt at login system.

    I must say, that is impressive. I, for one, quit VB.NET, because the idiots who made it, cant help me with an error that apparently cant get fixed. My properties box wont show any properties. I reinstalled VS2008 AND THE FRAMEWORKS, but it was no use.

  8. #8
    Account Upgraded | Title Enabled! Mr.Lucifer is offline
    MemberRank
    Apr 2007 Join Date
    797Posts

    Re: First attempt at login system.

    Give proper names to your buttons and other objects.

  9. #9
    Account Upgraded | Title Enabled! patrickisit is offline
    MemberRank
    Feb 2009 Join Date
    Birmingham, EngLocation
    414Posts

    Re: First attempt at login system.

    @Jeffijoe; Thanks, and yeah. That's Microsoft for ya' xD

    @Mr.Lucifer; Like it says, my first appempt. I couldn't be arsed with all that stuff.

    Just so everyone knows, I'm working on a messenging service with mySQL database and actual chat functions, so hopefully I'll get it working. =]

  10. #10
    Account Upgraded | Title Enabled! Mr.Lucifer is offline
    MemberRank
    Apr 2007 Join Date
    797Posts

    Re: First attempt at login system.

    Quote Originally Posted by patrickisit View Post
    @Mr.Lucifer; Like it says, my first appempt. I couldn't be bother with all that stuff.
    That's not something you have to bother with, it's something you do.

  11. #11
    The Omega Superfun is offline
    MemberRank
    Dec 2006 Join Date
    The NetherlandsLocation
    5,227Posts

    Re: First attempt at login system.

    Quote Originally Posted by Mr.Lucifer View Post
    That's not something you have to bother with, it's something you do.
    Exactly, otherwise you keep doing it, start with it and keep doing it.

  12. #12
    Account Upgraded | Title Enabled! patrickisit is offline
    MemberRank
    Feb 2009 Join Date
    Birmingham, EngLocation
    414Posts

    Re: First attempt at login system.

    Fair enough then.
    I will make sure I do that with my messenging system, for all forms.

  13. #13
    Valued Member bt5460 is offline
    MemberRank
    Dec 2006 Join Date
    your basement.Location
    104Posts

    Re: First attempt at login system.

    @ patricksit ; if it doesnt let you make it transparent when its over a picture box, then make the image the background for the main form and just dock it to the top, it will look the same and wont require any other objects on the form.

    =) GL! btw lif u get that messenger going post it here i RLY wanna see it! :D

  14. #14
    Extreme Coder - Delphi bounty-hunter is offline
    MemberRank
    Sep 2007 Join Date
    GunZone MansionLocation
    1,725Posts

    Re: First attempt at login system.

    not that great, this is really basic, i presume your a begginer, so if u want to perfect this, do exactly the same thing but in client + server application :)
    The client connects to server.
    Basically after you do that part, then you should know what to do next ;)

  15. #15
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: First attempt at login system.

    It's cool, but personally, I like mine better, slightly more advanced, but I would still call mine basic.. It stores the usernames and passwords remotely, so users dont update when there is a new user, it is just http://mysite.com/license?username=a...sword=anything lol, so simple, I also coded a little admin thing, so i can block users, delete them ect

    Spoiler:



Page 1 of 2 12 LastLast

Advertisement