Disabled designer due to inheriting abstract class?

心不动则不痛 提交于 2019-12-24 05:28:46

问题


I have a solution with one project. In that project are something live 40 or 50 forms. I've made 4 base forms that all the other forms can inherit. All 4 of those base forms inherit System.Windows.Forms.Form. Almost 90% of the forms inherit one of the first 2 base form. The rest inherits one of the last 2. But now I got this error out of nowhere, I made like 3 progs with the last 2 base forms and while I'm making the 5th, this errors occures and the designer is disabled.

The designer must create an instance of type 'xxxxxxx.frmBaseCr' but it cannot because the type is declared as abstract.

How an I solve this? I've searched on google for many hours now but I just can't find any working solution. I've tried the #if #else #endif statement but that doesn't seem to be working. I'm working in Visual Studio 2012 Express.


回答1:


You need to remove the MustInherit keyword.



来源:https://stackoverflow.com/questions/21707158/disabled-designer-due-to-inheriting-abstract-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!