I'm Using Visual Studio 2010 And I'm troubling with a problem in my project right now . this question you may feel like foolishness . But i don't know what happening.
In my Project there are 3 forms .
- Form1
- Form2
- DisplayFrm
I was trying to Open a form(DisplayFrm) using two Other forms(Form1 and Form2)
This is the code That i used to open the "DisplayFrm" using Both "Form1" and "Form2"
DisplayFrm.InitialLoadCustProf = RegCustIDtextBox.Text;
DisplayFrm frm = new DisplayFrm();
frm.ShowDialog();
- I have Opened "DisplayFrm" Using From1
- After Doing some Operations Over there I have Closed that Form using [X] button in Title bar.
- (Also i have tried by giving this.Close(); in a separate button)
The problem is that ,when i am opening DisplayFrm agian using Form2 ,it's not starting as a fresh form . it simply restoring the DisplayFrm which i have already Closed Before with the Operations i have done Already.
- I don't have this trouble with any other project . I think my project crashed ..it does not showing any kind of error.
- is there any way to use this.dispose(); with form Closing event?.Currently that not working Fine .
- Why my Form is not Getting Closed ? . Why it is behaving like i have used this.hide(); and this.show(); ?