(1)
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 图片的显示与隐藏
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
pictureBox1.Visible = true;//使图片可见
button1.Enabled = false;//使得按钮不能响应事件。
button2.Enabled = true;//隐藏按钮可用
}
private void button2_Click(object sender, EventArgs e)
{
pictureBox1.Visible = false;
button1.Enabled = true;
button2.Enabled = false;
}
}
}
(2)