如何使用组合框创建用户控件,以及如何将该组合框添加到许多表单中 [英] how to create a user control with combobox and how to add that combobox into many forms

查看:66
本文介绍了如何使用组合框创建用户控件,以及如何将该组合框添加到许多表单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请提供源代码帮助我

推荐答案

1)添加新的用户控件:右键单击您的项目,然后选择添加...用户控件".给它起一个适当的名称,然后按OK.
2)将ComboBox拖放到设计器中的控件表面上.
3)建立专案.
4)转到要在其中包含控件的表单的设计视图.
5)在工具箱中,您应该在常规"下的顶部或底部找到控件.就像对待工具箱中的任何其他控件一样对待它.
1) Add a new User control: Right click your project, and select "Add...User Control". Give it an appropriate name, and press OK.
2) Drag and drop a ComboBox onto your control surface in the designer.
3) Build your project.
4) Go to the design view for the form you want to include the control in.
5) In the toolbox, you should find your control, either at the top, or bottom under "General". Treat it as you would any other control in the toolbox.


这篇关于如何使用组合框创建用户控件,以及如何将该组合框添加到许多表单中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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