c# - Form Not getting Closed Completely while using "this.Close()" -
i'm using visual studio 2010 , i'm troubling problem in project right . question may feel foolishness . don't know happening.
in project there 3 forms .
- form1
- form2
- displayfrm
i trying open form(displayfrm) using 2 other forms(form1 , form2)
this code used open "displayfrm" using both "form1" , "form2"
displayfrm.initialloadcustprof = regcustidtextbox.text; displayfrm frm = new displayfrm(); frm.showdialog();
- i have opened "displayfrm" using from1
- after doing operations on there have closed form using [x] button in title bar.
- (also have tried giving this.close(); in separate button)
the problem ,when opening displayfrm agian using form2 ,it's not starting fresh form . restoring displayfrm have closed before operations have done already.
- i don't have trouble other project . think project crashed ..it not showing kind of error.
- is there way use this.dispose(); form closing event?.currently not working fine .
- why form not getting closed ? . why behaving have used this.hide(); , this.show(); ?
displayfrm.initialloadcustprof
seems static. try change instance property , open form this:
using( displayfrm frm = new displayfrm() ) { frm.initialloadcustprof = regcustidtextbox.text; frm.showdialog( ); }
Comments
Post a Comment