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:
[TD="class: gutter"][/TD]
[TD="class: code"]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
[/TD]
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.
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:
[TD="class: gutter"][/TD]
[TD="class: code"]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
[/TD]
also the ConnSucc is a variable i created, but its redundant now.
Last edited: