Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 ***? Why is this variable not working??

$
0
0
Ok i have been trying to hours and it looks SOOOO right, im getting irriated:/

Cannot understand why its not working..

In a little login form i have:
Public LoggedIn As String = "***"

then 2 textbox's which is user and pass.

Then i have:
Code:

        If TextBox1.Text = "Bryce" And TextBox2.Text = My.Settings.BrycePassword Then
            LoggedIn = "Bryce"
            MsgBox("Welcome, Bryce!", MsgBoxStyle.Information)
            Form1.Show()
            Me.Close()
            Exit Sub
        End If
        If TextBox1.Text.ToLower = "sheryl" And TextBox2.Text.ToLower = My.Settings.SherylPassword Then
            LoggedIn = "Sheryl"
            MsgBox("Welcome, Sheryl!", MsgBoxStyle.Information)
            Form1.Show()
            Me.Close()
            Exit Sub
        End If



        MsgBox("Error!", MsgBoxStyle.Critical)
        TextBox1.Text = ""
        TextBox2.Text = ""

Then on another form, when clicked a button i try to load the "LoggedIn" variable like this:
Code:

TextBox1.Text = Login.LoggedIn
And what does my textbox1 say:
"***"


Why is this part not working??
LoggedIn = "Bryce"
or
LoggedIn = "Sheryl"

??????????? :'(

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>