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
Awais Tanveer
NA
7
0
Project wont stop debugging.
Dec 15 2007 6:52 AM
Hi!
I am a novice.I have 2 Forms form1 and form2. On form1 i have placed a 2 buttons. Button1 takes the user to form2 using form2.show(); method and Button2 makes to user to exit from application which has a code of this.close(). It works fine and when user clicks that button2, it exits from the application and stops debugging fine.
Problem lies when user go to Form2 (which has a go back button that takes user back to form1) and comes back to Form1 to exit from application. now after coming back to Form1 and pressing the exit button, Form1 gets closed Ok but project wont return from debugging mode so i have stop debugging manually every time.
Though I am Disposing the Form2 object to release all the resouces before coming back to Form1 but still doesnt helps. Any thoughts?
here is the code on the Form2.
private void lable_back_MouseClick(object sender, MouseEventArgs e)
{
Form1 frm = new Form1();
frm.Region = this.Region;
this.Close();
this.Dispose();
frm.Show();
}
Any help would be appiciated.
Reply
Answers (
2
)
display files and folders
Pass parameters to form and back