如何在winform中进行自己的用户控制c# [英] how to make own user control in winform c#

查看:104
本文介绍了如何在winform中进行自己的用户控制c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在c#中以windows形式自己控制并将其添加到工具箱中,并将其与其他控件一样使用。任何身体请建议如何完成。提前谢谢:)..

i want to make my own control in windows form in c# and add it in toolbox and use it same as other control. any body please suggest to how to accomplished that. thanks in advance :)..

推荐答案

1)创建一个新的Windows窗体项目。键入:用户控件库。

2)为您生成一个空的用户控件。

3)让您的用户控制好看。

4)编译它。创建一个dll,您可以在其他项目中引用。
1) Create a new Windows Forms project. Type: "User controls library".
2) An empty user control is generated for you.
3) Make your user control fancy.
4) Compile it. A dll gets created that you can reference in your other projects.


参考



http://www.c-sharpcorner.com/UploadFile/7d3362/user-control-in-C-Sharp/ [ ^ ]





http://www.mindstick.com/Articles/d1bc25c6-b686-4423-9cf0-147046d6e39d/ [ ^ ]


或者你可以添加一个用户控件在你的项目中,编码你想要它做什么,然后在menustrip上转到:Build>构建解决方案或只需按F6。您应该能够在工具箱上看到该组件。
Or you can just add a User Control to your project, code what you want it to do and then on the menustrip go to: Build > Build Solution or just press F6. You should be able to see the component on your toolbox.


这篇关于如何在winform中进行自己的用户控制c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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