1,界面是这样的
2,源码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace taowa按钮
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
button2.BackColor = Color.Green;
button1.Enabled = false;
button3.Visible = false;
}
private void button2_Click(object sender, EventArgs e)
{
button3.Visible = true;
button3.BackColor = Color.Red;
}
private void button3_Click(object sender, EventArgs e)
{
button2.Visible = false;
button1.Enabled = true;
}
}
}