C# - .NET WinForms
In my example there are 2 objects: the MainForm, which has a custom control "control1" in it, and a UserControl "control2" that becomes a child of the MainForm.
I need to be able to respond to the click event of the control1 from within control2.
For some reason I'm unable to obtain a reference to control1 in the control2, so I'm thinking of declaring a method delegate in the MainForm (which does have visibility to the control1) and then, use that delegate in the control2. I hope, this way when the control1 is clicked the MainForm can raise the event and control2 can resplond to it.
Start Free Trial