在Windows平台上用C#创建UserControl [英] Creation of UserControl in C# on Windows Platform

查看:290
本文介绍了在Windows平台上用C#创建UserControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生/妈妈,



请告诉我在C#中创建用户控制的过程。

我使用的是Windows 7平台。我想在Windows窗体应用程序中创建它





请尽快帮助我。

< br $>
Subrahmanyam

[已删除] @ yahoo.co.in



谢谢。



电子邮件已删除 - OriginalGriff [/ edit]

Dear Sir/Mam,

Please let me know the process of creating user control in C#.
I am using Windows 7 Platform. I want to create it in Windows Form Application


Please Help me as soon as possible.

Subrahmanyam
[DELETED]@yahoo.co.in

Thank You.

[edit]Email removed - OriginalGriff[/edit]

推荐答案

这很简单。

打开VS并在解决方案资源管理器窗格中右键单击您的项目名称。

从弹出的菜单中选择添加...用户控制...

给你的控件一个合理的名字,然后按添加按钮。

将工具箱中的控件拖放到出现的表面上,并添加一些代码。

Build您的项目。

在您的某个表单的设计视图中,查看工具箱:在顶部将是一个新项目,项目名称为标题。

您的控件将准备好放到您的表单上。
It''s pretty easy.
Open VS and right click your project name in the Solution Explorer pane.
From the menu that pops up, select "Add...User Control..."
Give your control a sensible name, and press the "Add" button.
Drop controls from the toolbox onto the surface that appears, and add some code.
Build your project.
In the design view for one of your forms, look at the toolbox: at the top will be a new section with your project name as the header.
Your control will be there ready to drop onto your form.


这篇关于在Windows平台上用C#创建UserControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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