其实许多教材都有给的,慢慢学
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication5
{
public partial class Form1 : Form
{
string s;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
s = textBox1.Text;
string b = s.ToUpper();
textBox1.Text = b;
}
private void button2_Click(object sender, EventArgs e)
{
s = textBox1.Text;
string b = s.ToLower();
textBox1.Text = b;
}
private void button3_Click(object sender, EventArgs e)
{
this.textBox1.Text = s;
}
}
}
追问怎么是 3个 button 啊?貌似不对吧!
追答那你把你设置的Button连接就好了!