|
-
February 15th, 2008, 02:12 PM
#1
[RESOLVED] login form problem 2
here is the code i am using:
Code:
Public Class LoginForm1
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
If Me.UsernameTextBox.Text = "" And Me.PasswordTextBox.Text = "" Then
Dim form As New Form
Form1.Show()
Me.Hide()
Else
MsgBox("Could not verify your identity. Invalid username or password.")
PasswordTextBox.Text = ""
UsernameTextBox.Text = ""
UsernameTextBox.Select()
End If
Me.Close()
End Sub
Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
Me.Close()
End Sub
Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub UsernameLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UsernameLabel.Click
End Sub
after correct info is entered it doesnt load form1. any help? thankyou
-
February 15th, 2008, 02:15 PM
#2
Re: login form problem 2
Well you say Dim Form as New Form and then Form1.Show?
Sounds wrong to me.
Try Form.Show, this is the object you have initialized.
-
February 15th, 2008, 02:22 PM
#3
Re: login form problem 2
it still does not bring me to form1 after information has been entered
-
February 15th, 2008, 03:11 PM
#4
Re: login form problem 2
Take out the me.close and it works.
-
February 16th, 2008, 08:19 AM
#5
Re: login form problem 2
thankyou that works great.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|