您的位置:首页 > 其它

第一个windows应用程序

2013-09-27 11:39 302 查看
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace HelloWin
{
public partial class HelloFrm : Form
{
public HelloFrm()
{
InitializeComponent();
}

private void HelloFrm_Load(object sender, EventArgs e)
{
this.Text = "这是一个具有输入功能的窗体!";
}

private void btnOK_Click(object sender, EventArgs e)
{
string result;
result = txtName.Text + "小姐 ";//txtName 是TextBox1的名字,Text是文本内容
result += "恭喜你,学会了C#程序设计!";
lblShow.Text = result;//lblShow是labl2的名字!属性设置时改的!Text是文本内容
//txtName.Text是标签一的内容,lblShow.Text是标签二的内容
}

}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: