Adding Form2

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

I want to add a second Windows Form to my app, but do not
know how to implement communication between the 2 Forms.
I want to be able to open and close Form2 from a button on
Form1 and need to know if Form2 is open or closed. Also,
I would like to open and close Form2 without causing logic
conflicts on Form1. I know in Visual J++6 they use an
interface to communicate between 2 Forms. My question is
How ? How do the 2 Forms communicate with one another ?
Please help RS.
 
Hi Rob,

When you really want to open and close it from everywhere then you get fast
strange not logical situations.

I think it is better to make form2 visable or/and hide it from your form1
and from your form2.

Just my thought.

Cor
 
* "Rob said:
I want to add a second Windows Form to my app, but do not
know how to implement communication between the 2 Forms.
I want to be able to open and close Form2 from a button on
Form1 and need to know if Form2 is open or closed. Also,
I would like to open and close Form2 without causing logic
conflicts on Form1.

In the simplest case, you will have to pass a reference to the other
form. This reference can be used to close the form.
 
Back
Top