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是标签二的内容
}
}
}