Hi,
I'm developing a C# Windows Form app, which contains 2 UserControls
in the MainForm. One of the UserControls contains a number of layers
as shown in the following hierarcy:
MainForm
UserControl1 UserControl2
SplitContainer
SplitContainer.Panel1
UserControl3
Button1, Button2, etc
Problem:
When the user clicks a button on UserControl3, I need to pass that
information to UserControl1 on the MainForm. I know how to add an
event for a Button1_Click at the UserControl3 level, but I can't figure
out how to get this event to the MainForm. I've tried many things,
including adding a public ProcessButton() method to the MainForm
and then trying to call it from UserControl3 with 'this.ParentForm.???'.
All to no avail.
Question:
When the user clicks on Button1, how can I propagate this event up
to the MainForm so it can tell UserControl1 to do something?
Thanks for any suggestions,
RickL