R
RubiconXing
Hi All
Beginner question - please be patient with me I am new to c#.
If one creates a child modal (and also non-modal) form what is the
best way of returning the collected data back to the calling form?
For example, say off of my main form I launch a modal dialog box that
gets the username and password what is the best way of passing that
data back? The info has to go into an object eventually so I can
easily stuff the data into an object in the child form. But how does
the object then get back - would I pass a reference back in an event
for this?
Is it better to pre-create the object in the main form, pass it in a
reference to the form handler before the Show() or ShowDialog call. I
suppose in a non-modal form you would have to send an event of some
sort to tell the main form to process the object.
Just not sure of the typical way this is handled - all advice
appreciated.
Thanks
-R
Beginner question - please be patient with me I am new to c#.
If one creates a child modal (and also non-modal) form what is the
best way of returning the collected data back to the calling form?
For example, say off of my main form I launch a modal dialog box that
gets the username and password what is the best way of passing that
data back? The info has to go into an object eventually so I can
easily stuff the data into an object in the child form. But how does
the object then get back - would I pass a reference back in an event
for this?
Is it better to pre-create the object in the main form, pass it in a
reference to the form handler before the Show() or ShowDialog call. I
suppose in a non-modal form you would have to send an event of some
sort to tell the main form to process the object.
Just not sure of the typical way this is handled - all advice
appreciated.
Thanks
-R