Communicate between 3 forms

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

OK. So I have 3 forms 'A', 'B' and 'C'. 'C' needs to be able to communicate
with 'A' or 'B' but never both at the same time (If 'A' is visible, 'B'
doesn't exist and vice versa). Is there something I can put in the New() of
'C' that would make reference to both forms? I tried Overloading New() but
that didn't work. Or if using the New() for this scenario is not proper,
what other way should I be looking at?

Any help is greatly appreciated.
 
Mark said:
OK. So I have 3 forms 'A', 'B' and 'C'. 'C' needs to be able to
communicate
with 'A' or 'B' but never both at the same time (If 'A' is visible, 'B'
doesn't exist and vice versa). Is there something I can put in the New()
of
'C' that would make reference to both forms? I tried Overloading New()
but
that didn't work. Or if using the New() for this scenario is not proper,
what other way should I be looking at?

Any help is greatly appreciated.

The form is an object. So, pass the form into the constructor of form C as
Object and maybe some other flag/indicator to tell what form it is and cast
the Object to the form A or B as needed in C.
 
Mark,

In this it is essential that you show us how you instance C.
For that are about 12 ways possible, all have their own issues.

Cor
 

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

Back
Top