dotnet 3.5中的用户控件(Windows应用程序) [英] USer Control in dotnet 3.5(windows application)

查看:82
本文介绍了dotnet 3.5中的用户控件(Windows应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
谁能告诉我如何在.Net 3.5 Windows应用程序中添加用户控件.

谢谢

Hello,
Can anyone tell me how to add user control in .Net 3.5 windows application.

Thanks

推荐答案

首先,您必须明显地创建自己的UserControl并对其进行构建.

然后转到要在其中包含UserControl的第二个项目.

1.右键单击工具箱,然后单击选择项目..."(可能需要一段时间才能加载)

2.在".NET Framework组件"选项卡中,单击浏览"按钮.

3.找到UserControl的DLL文件(在UserControl(bin)文件夹的Release/Debug文件夹内,然后单击打开".

4.检查要显示在工具箱中的UserControl.

5.将其拖动到表单上!

如果以这种方式进行操作,它也会在您的代码中自动引用,因此不需要真正的手动编码操作.

祝您好运
First you have to create your own UserControl obviously and Build it.

Then go to your second project in which you want to include the UserControl.

1. Right Click in the Toolbox and click "Choose Items..." (Can take a while to load)

2. Inside the .NET Framework Components tab click on the Browse button.

3. Locate your DLL file of the UserControl (Inside the Release/Debug folder from your UserControl (bin) folder and click Open.

4. Check your UserControl to be shown in the Toolbox.

5. Drag it on your form!

If you do it this way it will also be automatically referenced in your code so no real manual coding actions needed.

Good luck


需要更多信息:您是否要编写一个用户控件,可以将其添加到其他应用程序中,或包含您在应用程序中编写的控件,或包含其他人拥有的控件?是写的吗?
More information needed: Do you want to write a user control, that you can add to other apps, or include one you have written in an app, or include one someone else has written?


这篇关于dotnet 3.5中的用户控件(Windows应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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