I have an existing .NET application with many controls already created.
Now I have a new custom control class for buttons - say - (which inherits from "Button"), with additional properties, methods, etc. Compiled perfectly and it appears on my toolbar.
How can I tell VS that I want to REPLACE existing controls with a new one?
I mean, if I open the designer code and manually change the type of control, VS is really unhappy, and the design is broken and will go down with an unpleasant error message.
Is there any way to change the code created by the constructor without breaking the design in VS?
Or is there a way to do this, except manually delete each control and create a new one? This would be a real problem, since all control handlers will be deleted in the form code when I remove the control. How:
handles myControl.Click ... handles myControl.MouseHover ... etc.
Welcome any greetings!
source
share