继承表格将控件重复到设计师
我在Windows表单中继承有问题。 我创建了一个具有一些控件和事件的基本类别,以及一个从基类继承的类。当我尝试打开继承类的设计师时,它会给我一个错误消息:“重复的组件名称....组件名称必须是唯一的,并且对案例不敏感”。
因此,出现此错误消息是因为它将基本形式的某些控件(并非全部)复制到继承的表单的Designer.cs中。我的所有控件都是“受保护的”。
为什么它通常会复制一些控件,为什么不全部?
I have a problem with inheriting in Windows Forms.
I created a base form class with some controls and events and a class which inherits from the base class. When I try to open the designer of the inherited class it gives me this error message: "Duplicate component name .... Component names must be unique and case-insensitive".
So this error message appears because it copied some (not all) of the controls of the base form into the designer.cs of the inherited form. All of my controls are 'protected'.
Why it copies some of the controls in general and why not all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论