
MDI child reference HELP PLEEZ
Quote:
>Ok I have an mdi parent active with several child windows. User selects
file
>/open picks a file..how do I reference the ACTIVE child from the parent?
from
>within the child I can use ME, but how do I trigger it from the parent
form??
OK, here is the problem: you may not reference variables or subs in the
child, only properties (like tag) or events (like click). (At least that is
the way I understand it, if someone knows of a way, I would love to hear
it). The way I do what you describe is to design two menu structures that
are nearly identical, one on the parent and one on the child. When a child
is the active form in the parent, the child menu replaces the parent menu.
Since the selection for File|Open would be from the child menu, you can
still use ME to do your operations.
To reference a property or event of the active child, use the ActiveForm
property: MDIForm1.ActiveForm.tag = "Child1" will set the active child
form's tag property to "Child1". If there are no active children,
activeform returns an error.
Hope this helps.
-----------------------
Bob Robinson
Atlanta, GA