开发者

How to Change Base class of Designer generated class from System.Windows.Forms.Form to my own BaseForm

Everytime I add a new Form to my WinForms project, the designer generates code of a new class which inherits from System.Windows.Forms.Form.

For some reason,开发者_开发技巧 I want it to inherit from my own BaseForm class. Any way to automate it other than editing the generated file myself?

Thanks!


This is actually a scenario that Visual Studio supports directly. From your project add a new item. From the dialog that is displayed select "Inherited Form." The next window should let you select the base form you want to use for your new form.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜