help on form prob

seanvoth

Well-known member
Joined
Aug 5, 2006
Messages
58
Programming Experience
1-3
ok a have a form a buton and a textbox
so i put it all togeter and made a login form
but i added a new form by clicking on add new
item.so nowi have a login form and a form 2
i put a web link on the form 2
so what i want it to do is when i click on the button
"login" it say's "welcome" if you type the right password
but when the msgbox says "welcome" and when i click on "Ok"
it will combine the form 2 after i click ok
if uunder sand please help




if u type any code please please please, say ware the code gose to :eek: :cool: :rolleyes: :confused:
 
so basically you want it that when the user types in the correct password the 2nd form opens and the linklabel says "Welcome"?
 
no i want it so when i type in the right password..... ok this is my code and i will tell u more after that
VB.NET:
 [SIZE=2][COLOR=#0000ff]
Private[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Button1_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] Button1.Click
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] TextBox1.Text.ToLower = "basic.net" [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]MessageBox.Show("Welcome")
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE]

ok now after the welcome mssage shows i want it to combine or show form2.vb
 
VB.NET:
If TextBox1.Text.ToLower = "basic.net" Then
  MessageBox.Show("Welcome")
  Dim Frm2 As New Form2
  Me.Hide()
  Frm2.Show()
Else
  Me.Close
EndIf
 
Back
Top