c# - Winform handling -


i have 3 forms. can enter form2 through form1.(then form1 disappear.) when close form2, form1 reappear. can enter form3 through form2.(then form2 disappear.) when close form3, form2 should reappear.(this part fail.)

when close form3, form appear form1 instead of form2. (same instances have reappear. 'creating new object of form , make appear' not allowed :) )

please help.

code in form1:

        this.showintaskbar = false;         this.visible = false;         form2 f2 = new form2();         f2.showdialog();         this.visible = true;         this.showintaskbar = true; 

code in form2:

        this.visible = false;         this.showintaskbar = false;         form3 f3 = new form3();         f3.showdialog();         this.visible = true;         this.showintaskbar = true; 

not sure, try make form2's parent form1:

form2.parent=form1; 

or

f2.showdialog(form1); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -