0

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.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Robert47303
0
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 :(

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.