我正在使用 Win Form VS 2010 C#。
我在表单加载上有以下代码
pictureBox2.MouseClick +=new MouseEventHandler(pictureBox2_Click);
pictureBox2.DoubleClick += new EventHandler(pictureBox2_Click);
pictureBox2.Click += new EventHandler(pictureBox2_Click);
pictureBox2.MouseDoubleClick += new MouseEventHandler(pictureBox2_Click);
这在事件
private void pictureBox2_Click(object sender, EventArgs e)
{
// Hides and disables another picture box
pictureBox1.Enabled = false;
pictureBox1.Visible = false;
// more codes here...
}
它不想触发事件。为了确定,我什至添加了切换断点,但它永远不会停在那里。
我的pictureBox2 有一个属性BackColor Transparent。这有什么关系吗?