David,
It's like any other method on any other object. Basically, in the
method of FormA, you would create an instance of FormB. Then, you can show
the form if you wish, calling the show method. However, you said you want
to get values returned. So, what you can do on FormB is have a method that
will show the form, as well as return any values that you need. Forms are
nothing more than objects, and you should treat them as such.
Also, if a form is closed, that doesn't mean that you lose the reference
that you have to it. It just means that it is not being shown (or it has
been destroyed, but that doesn't mean that the object wrapper is destroyed).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"David K." <ke*******@013.net.il> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl...
Hello,
I am a novice to C#.
Say I have two Windows Form: A and B (not a DialogBox).
Suppose I want from Form A object to create and display Form B object
(passing it parameters).
When closing the Form B object, I would like to get the return
parameter/s. Can anybody show me a way of doing it?
Thanks,
David