Is it possible to create a Windows Form in a C# Class Library?

前端 未结 4 1725
栀梦
栀梦 2021-02-05 19:19

I\'ve been building DLL class libraries in C#, used as add-ons to an application which provides a Custom API. Up until now they\'ve included mostly interfacing with databases,

4条回答
  •  情书的邮戳
    2021-02-05 20:06

    What I find works best for me is to create a new Windows Forms project, and then go to the project properties and change it to a class library. This way, you can right click on folders in the solution explorer and all the WinForms items appear just as if it were still a WinForms project, but it's a class library. This also works with WPF applications.

提交回复
热议问题