private void button4_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
MessageBox.Show("aaaa");
if (e.Button == System.Windows.Forms.MouseButtons.Right)
MessageBox.Show("bbbb");
}
为什么右键点击,没有输出bbbb呢?
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
MessageBox.Show("aaaa");
if (e.Button == System.Windows.Forms.MouseButtons.Right)
MessageBox.Show("bbbb");
}
为什么右键点击,没有输出bbbb呢?
可用MouseUp
只有左键才会触发click事件,你只能用MosueUp