IncognitoMan
asked on
Child To Parent Form Problem
Hey guys,
I have the following problem.
For example there is a main form and it is a parent to all others. It creates a child form and hides. I want the main form to show when the child is closed. I've done this with creatin FormClose event of the child but in the parent form and it calls a function in the parent form, which shows it. So far so good.
The problem is:
When the main form creates a child 1 and the child 1 creates its own child 2 and sometimes child 1 closes this there is no way to show the main form. The other thing is, that somtimes child 2 can be a irect child of the main form, so I can't know who will be creating it.
I have the following problem.
For example there is a main form and it is a parent to all others. It creates a child form and hides. I want the main form to show when the child is closed. I've done this with creatin FormClose event of the child but in the parent form and it calls a function in the parent form, which shows it. So far so good.
The problem is:
When the main form creates a child 1 and the child 1 creates its own child 2 and sometimes child 1 closes this there is no way to show the main form. The other thing is, that somtimes child 2 can be a irect child of the main form, so I can't know who will be creating it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Any of three ways would work. Interfaces lend them self perfectly to this situation. Split the points as the responses here all have merrit.
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.