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

前端 未结 1 1171
余生分开走
余生分开走 2021-01-21 02:11

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 t

相关标签:
1条回答
  • 2021-01-21 02:42

    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 讨论(0)
提交回复
热议问题