"jy836" <mo***@nospam.com> wrote in message
news:RFSUb.185196$Rc4.1414107@attbi_s54...
Thanks for your reply. Maybe I should explain what it is I'm trying to do.
Generally speaking explanations usually do help :-) In this case the answer
is... "you don't want to do it that way." Problem solved :-)
Seriously if you "really wanted" to have your PrefsForm interact with
controls on your main form you could pass along a reference to the main
form... again consider what you would do if these weren't forms but were any
other object which you happened to be working with. This could be done in
the constructor of PrefsForm for instance. You could also set it up to just
the control along. But neither case is ideal.
Rather when your main form receives control again have it get the
information out of PrefsForm. After the ShowDialog you can add code that
access it. Note that you still have a reference at that time. The form
can't be seen but it exists.
As a third alternative you can create a single public class that
encapsulates all the user preference information and both your main form and
the PresForm can reference it. Doing it that way would mean you wouldn't
have to come up with some scheme to pass along all the current user
preferences if they select the PrefsForm again.
Tom