0

Don't know why login page is not visible

Dim username, paswd As String Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click username = LPTextBox1.Text paswd = LPTextBox1.Text If (username.Equals("Binu") And paswd.Equals("Om")) Then Form3.Show() Me.Hide() Else MessageBox.Show("Invalid Username or Password", "", MessageBoxButtons.OK, MessageBoxIcon.Error) End If End Sub

14th Aug 2022, 4:28 PM
Om Yele
Om Yele - avatar
4 Respostas
+ 1
That happend because you have the same text box for username and password LPTextBox1 in above mentioned code.
14th Aug 2022, 8:41 PM
JaScript
JaScript - avatar
0
First of all, sololearn do not support vb.net. There can be a few different things why, which can be seen in another code, which you don‘t present here. Where is the Form1 and how you load the Form2 etc?
14th Aug 2022, 5:17 PM
JaScript
JaScript - avatar
0
When I write username and paswd as Binu then form3 gets visible but in paswd when I write Om or only 123. Then it raise an error.
14th Aug 2022, 5:26 PM
Om Yele
Om Yele - avatar
0
Oh 😣😣😣😣 . My bad 😔😔. Thankyou . Eagle eye 👀👀👀
15th Aug 2022, 2:37 AM
Om Yele
Om Yele - avatar