TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Monosky babuye
NA
26
10.6k
multiple forms
Jan 14 2011 5:43 PM
Hi guys, i had a question. i already had a c# form but now i wanted to created a log on form to verify a user before he can access the second form. i placed the code below but still the intial form comes up first.
if ((this.textBoxUsername.Text == "Admin") && (this.textBoxPassword.Text == "mbuyu"))
{
Form1 sortform = new Form1();
sortform.Show();
this.Hide();
}
else
MessageBox.Show("You are not authorised to access this page", "Info");
}
How do i make the new form come before the initial form.
Thanks in advance!
Reply
Answers (
2
)
Difference between instantiate object in class and in constructor of class?
A gift from theLizard -