I am trying to modify the visible property of a control in an inherited form. The base class is a form in a dll. The inheriting form is in a different DLL in the same solution workspace. All the controls appear as expected in the inheriting form. Most of the controls in the base class form are public so that I can move, or hide them in the inheriting form. I have succeeded in positioning and hiding many of the controls in the inheriting form. Then I added a new button to the base class. Initially I had difficulty getting the new button to show up in the inheriting class, but after cleaning and rebuilding and getting out of Studio and back in many times, eventually the new control appeared in the inheriting class (I don't know what I did that finally made the new control appear). Now I am trying to change the visible property of the new control in the inheriting class. When I do this I get the following compile error:
Error1'SEL.CustomForms.formStatusData' does not contain a definition for 'buttonShowGrid'C:\Demo\MeterDevice\CustomForms\DataStatus.Designer.cs31818CustomForms
This error results from the new code that was inserted by the designer into my inheriting class's designer code file:
//
// buttonShowGrid
//
this.buttonShowGrid.Visible = false;
This code seems correct. The only way to get rid of the error is to remove this code. But I want to hide the control, so how do I do it?
I think there must be some corruption in my designer files somewhere, but I have no idea how to find it. There is no other apparent problem. The application works as expected. I have read through many postings that seem related to my problem, but none of the solutions offered help me. I am happy to share my project files with anyone willing to take a look.