hi all, im trying to make a login system, but the problem is that i want my program to read a user name and password from a file stored on the computer so it can be changed by the user. Ive tried making one at the minute but to no success lol, hopefully someone would be able to help me out.

What have you tried? What's it doing wrong? The source code would be useful.

Public Class login
    Dim reader As IO.StreamReader = New IO.StreamReader("C:\user.txt")
    Private Sub login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


        Do While reader.EndOfStream = False

            ComboBox1.Items.Add(reader.ReadLine)

        Loop

        Me.TopMost = True
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If ComboBox1.Text = TextBox1.Text Then
            MsgBox("Welcome")
        End If

        If TextBox1.Text = " " Then
            MsgBox("error")
        End If
    End Sub
End Class

this is what ive tried with a few other things but i doesnt work :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.