Communicate between 3 forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TWFyaw==?=

    Communicate between 3 forms

    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.
  • Mr. Arnold

    #2
    Re: Communicate between 3 forms


    "Mark" <Mark@discussio ns.microsoft.co mwrote in message
    news:ADC3ED4C-D18F-4CBC-9259-1DACEDEEE8BD@mi crosoft.com...
    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.


    Comment

    • Cor Ligthert[MVP]

      #3
      Re: Communicate between 3 forms

      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


      "Mark" <Mark@discussio ns.microsoft.co mschreef in bericht
      news:ADC3ED4C-D18F-4CBC-9259-1DACEDEEE8BD@mi crosoft.com...
      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.

      Comment

      Working...