如何将Windows窗体转换为DLL [英] How to convert a windows form to dll

查看:73
本文介绍了如何将Windows窗体转换为DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有



我在.net中的Windows应用程序中工作。我想将我的Windows应用程序中的每个表单转换为dll。如何将已经编码的窗体转换为dll。



预付谢谢

Amrutha

hi All

Iam working in windows application in .net.I want to convert each forms in my windows application to dll. how to convert already coded windows forms to dll.

Thanks in Advance
Amrutha

推荐答案

创建一个新的类库项目(每个窗体一个,或者一个覆盖它们)。

在解决方案资源管理器窗格中,右键单击您的DLL项目名称,然后选择添加 ...现有项目。

在结果对话框中,选择构成表单的文件 - 您只需要myForm.cs或MyForm.vb文件,而不是.designer.cs或.resx文件 - 它们将被自动拾取。

当你按OK时,文件将被复制到你的新项目。

完成!编译,你就离开了。
Create a new Class Library project (either one per form, or one to cover them all).
In the Solution Explorer pane, right click your DLL project name, and select "Add...Existing Item".
In the dialog that results, select the file or files that make up your form(s) - you only need the myForm.cs or MyForm.vb files, not the .designer.cs or .resx files - they will be picked up automatically.
When you press OK, the files will be copied to your new project.
Done! Compile, and you are off.


这篇关于如何将Windows窗体转换为DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆