Can anyone tell me why this doesn't fire a message when I press the middle or right button on my mouse?Code:void richTextBox1_MouseClick(object sender, MouseEventArgs e)
{
MessageBox.Show(e.Button.ToString());
}
Printable View
Can anyone tell me why this doesn't fire a message when I press the middle or right button on my mouse?Code:void richTextBox1_MouseClick(object sender, MouseEventArgs e)
{
MessageBox.Show(e.Button.ToString());
}
You'll need to handle MouseDown or MouseUp. MouseClick is basically a shorter way to using MouseUp and checking if the left button is clicked. I don't believe it'll pass arguments for any other buttons.
Thanks