0
votes

The way my application is organized is I have a base form and multiple child forms that inherit from it. I also have a button defined as a UI control. I want to add the UI control to the base form so all the child forms can also have that control. However, I don't want to mess with all the individual child forms because the control should be the same for all of them. What I have done so far: Added the control to the designer of baseFrom.cs, which in turn created a InitializeComponent() function in the base form that listed all the properties of the control. I have tried calling the InitializeComponent in the base form's constructor but that still does not make the control appear in any of the child forms. What am I missing here?

1
Must be the "UI Control" you mentioned. Do you mean it's a UserControl? Or what... - DonBoitnott
Why dont you just add the button on the design of the parent? - Aimnox
@Aimnox Read: "What I have done so far: Added the control to the designer of baseFrom.cs" - DonBoitnott
@DonBoitnott: Yes, UserControl - Eddy221
You'll probably have to post some UC code, or at least the ctor and Load() stuff. Controls should do exactly what you expect, so something's broken. - DonBoitnott

1 Answers

0
votes

after you add control to base form you need to build solution and then control will appear in inherited forms