jxbma
asked on
What's the best way to broadcast a custom event from a .Net MDI parent window to it's MDI child forms?
Hi:
I'm working an .Net MDI based application written in C#.
I would like to create a custom event which when broadcasted from the MDI parent would be
received by all MDI child forms. (Much like a custom windows message in pre-.Net days).
The child window would then act on the message if interested.
I know I could brute force this by having a public interface exposed on my subclassed MDI child windows.
From the MDI Parent window, I could then iterate over all the children and call the newly defined/exposed interface.
I figured there must be a more "correct"/"graceful" way to do this.
Thanks,
JohnB
I'm working an .Net MDI based application written in C#.
I would like to create a custom event which when broadcasted from the MDI parent would be
received by all MDI child forms. (Much like a custom windows message in pre-.Net days).
The child window would then act on the message if interested.
I know I could brute force this by having a public interface exposed on my subclassed MDI child windows.
From the MDI Parent window, I could then iterate over all the children and call the newly defined/exposed interface.
I figured there must be a more "correct"/"graceful" way to do this.
Thanks,
JohnB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Spot on.
Thanks fore getting back to me so quickly!