I'm writing a simple minesweeper game over my Christmas break and I'm adding in the feature where you click with both mouse buttons on a number and it unveils the hidden boxes around it when it's safe to do so. ie the number is a 1 and you've flagged 1 mine, so it uncovers all other boxes next to the 1. Quick side note: I love that minesweeper is a tag.
I have a mouse click event on the label, but there is no "Both right and left buttons together" option for System.Windows.Forms.MouseButtons
. So, how do I do this?
private void label1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left &&
e.Button == System.Windows.Forms.MouseButtons.Right)
{
MessageBox.Show("doesn't work");
}
}
pressed
event. – Weft