Question Form login problem

StarKiller512

Member
Joined
Nov 15, 2012
Messages
13
Programming Experience
1-3
I have created a form that uses a database, a login screen and a registration screen once the application has started. What i want it to do is this:
The startup screen and the registration screen will be loaded first. The text box at the top of the startup screen says 'You must login or register first'.
Once the user has logged in or registered it will display a message saying that they are successful. if not they will be told to register.
Once this has been acheived, the startup screen should enable the Start button and the text in the box should change to 'Welcome (name)"
heres the code i have so far:
Private Sub frm_StartUp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
TextBox3.Text = frm_login.Connsucc
If frm_login.Connsucc Then
TextBox1.Hide()
TextBox2.Show()
TextBox2.Text = ("Hello " & frm_Start.TextBox1.Text)
Btn_Start.Enabled = True
Btn_Options.Enabled = True
btn_Click.Enabled = True
Me.Refresh()
Else
TextBox1.Show()
TextBox1.Text = "You must register or login first before playing this game"
TextBox2.Hide()
Btn_Start.Enabled = True
Btn_Options.Enabled = False
btn_Click.Enabled = True
End If
frm_Start.Show()
End Sub
just for now the Btn_Enabled is true for now so i can work on the game itself. i'll turn it back to false once i either have an answer or i've finshed the game part of the application
also the ConnSucc is a variable i created, but its redundant now.
 
Last edited:
Hi,

Your post makes no sense at the moment.

Firstly, you do not explain what the problem is that you are having so I have no idea what you are asking us to help you with? Secondly, you say that your ConnSucc variable is redundant but it forms the core of your conditional statement in the code that you have provided?

I suggest that you need to correct your code and expand a little on what you have posted to enable us to help you better.

Cheers,

Ian
 
no worrys. i've sorted it. The problem i was trying to solve was the fact that the startup form was meant to refresh and show a different text when the user either registered or logged in successfully. using the .Refresh syntax didnt work.
 
Back
Top