Navigating between forms

G

ganesh

hi

i have a simple application that has 2 forms - FormA and FormB. I have
a button on FormA that opens up FormB, but I need to hide FormA first
(not close, since i do not want to lose the data collected on FormA).
So, I used the Hide() method for this. On FormB, i have another button
that should show FormA. (FormB can be closed). what is the best way to
do this?

rgds
ganesh
 
M

Mattias Sjögren

i have a simple application that has 2 forms - FormA and FormB. I have
a button on FormA that opens up FormB, but I need to hide FormA first
(not close, since i do not want to lose the data collected on FormA).
So, I used the Hide() method for this. On FormB, i have another button
that should show FormA. (FormB can be closed). what is the best way to
do this?

Pass a reference to the FormA instance to the constructor or other
method on FormB. Store it and then call the Show method when FormB is
closing.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top