Hi all - I have a question regarding how to use an interface in a form that is already open.
I have a C# project with two forms in it, A and B.
I have an interface X in a separate class, and B implements the interface methods, which update certain text boxes in B.
My question is: how do I call the interface from A without creating a new instance of B?
For example, if I do this in A:
frmB xxx = new frmB();
xxx.PerformInterfaceMethod();
xxx.Show();
then of course a new instance of B pops up, with the actions defined by PerformInterfaceMethod() causing some of its text boxes to be modified, but this is not what I want.
The reason is that B is already open with some information on it. You press a button, causing A to open, then you select something in A which will cause B to alter the content of some of its text boxes, so I don't want to create a new instance of B: I want to affect the instance of B that is already open.
How do I do this?