表单作为用户控件 [英] Form as User Control
本文介绍了表单作为用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我已经在C#中创建了一个表单,我需要将其转换为用户控件,以便可以将相同的表单(例如弹出对话框)用于其他项目,我不想将现有表单及其代码添加到新表单中项目,而不是我需要将其转换为DLL或可以轻松包含在所有项目中的内容.
我该怎么办?
谢谢.
解决方案
您需要创建用户控件项目&在其中添加您的弹出对话框代码,编译项目&它将创建dll,您可以在其他项目中使用该dll作为控件.
有关详细信息,您可以查看此链接. [ ^ ]
Hai Everyone,
I have created a form in C# , I need to Convert it as a user control so that I can use the same form (Say a Popup Dialog) for other projects , I do not want to add the existing form and its code into the new Project rather than I need to Convert it to a DLL or something which can be easily included in all project .
How can I do this ?
Thanks All.
解决方案
You need to create user control project & add your Popup Dialog code into that, compile the project & it will create dll, you can use that dll in other project as control.
for detail information you can see this link.[^]
这篇关于表单作为用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文