ALX
Well-known member
I have "Form-A" that incorporates user control "UserControl-1".
Usercontrol-1 raises an event ("Event-X") that is handled by Form-A.
Now "Form-A" generates "Form-B" as a modal form (showdialog).
Form-B incorporates its own instance of UserControl-1.
Form-B has an event handler to handle the Event-X raised by it's instance of UserControl-1.
When Form-B's instance of UserControl-1 raises it's Event-X, neither Form-A or Form-B trap the event. I somehow expected Form-B to catch the event since it is a modal form and this particular Usercontrol-1 was instanciated by Form-B, but I would have been equally happy if both Form-A and Form-B trapped the event. I was suprised that neither form received the event.
...Anybody have a method for dealing with this ambiguity?
Usercontrol-1 raises an event ("Event-X") that is handled by Form-A.
Now "Form-A" generates "Form-B" as a modal form (showdialog).
Form-B incorporates its own instance of UserControl-1.
Form-B has an event handler to handle the Event-X raised by it's instance of UserControl-1.
When Form-B's instance of UserControl-1 raises it's Event-X, neither Form-A or Form-B trap the event. I somehow expected Form-B to catch the event since it is a modal form and this particular Usercontrol-1 was instanciated by Form-B, but I would have been equally happy if both Form-A and Form-B trapped the event. I was suprised that neither form received the event.
...Anybody have a method for dealing with this ambiguity?