I am wondering how do you re show a hidden windows form(in this case a windows mobile form but probably done the same way in windows forms).
Like Say I do this
Load Form 1 Click on a Button to Load Form 2 up Click on a button to load Form 3 up and hide Form 2. Click on a button to close Form 3 up and show Form 2.
I know how to hide and show them it is just hide() and show().
this is I am not sure how to call the Form2.show().
Form3 Form = new Form3()
Form.show();
this.close();
So this would make it show Form 2 would be closed then if I wanted to recreate it
Form2 Form = new Form2()
Form.show()
this.close()
So if I would do开发者_JS百科 the above code then I would have 2 Form2 shown since I would have 2 Form2 objects.
Instead of creating new forms every time before showing them, try to create them once and save the reference to that Form (as a member in your class, for example). Then use that reference to show the form.
精彩评论