This is a bit complicated to follow. But please try.

I have one class with a form in it. And as a member object it has an object of an other form. Lets call the first one A and the one contained in A for B.


When A starts, it makes an instance of the B form, and showes it. Then B will let them choose some options, and when they press the OK button, I want A to be able to receive these settings. No matter how it is done. I have tried a couple of things, but not sure what way to go about it.

I tried passing a "this" pointer to the object Bs constructor. And I am able to send values back with this pointer. But the problem is that when Form B is disposed, it will also dispose what is in the other end of the pointer. Hence it disposes Form A too.

In C++ I guess I would have used a function pointer, and in C# that is more or less a Delegate (even if it is not exactly the same thing).

So any good sugestions here?
- ØØ -