title: How to get a right click mouse event? Changing EventArgs to MouseEventArgs causes an error in Form1Designer?
body: <p>I have a method to detect the left click event that visual studio made by double clicking on the form.</p>
  
  <pre><code>private void pictureBox1_Click(object sender, EventArgs e)
  {
      MessageBox.Show("Left click");
  }
  </code></pre>
  
  <p>I want to have a right-click event by right-clicking on the same object.</p>
  
  <p>I read online that you can use this switch:</p>
  
  <pre><code>private void pictureBox1_Click(object sender, EventArgs e)
  {
      if (e.Button == System.Windows.Forms.MouseButtons.Right){MessageBox.Show("Right click");}
      if (e.Button == System.Windows.Forms.MouseButtons.Left){MessageBox.Show("Left click");}
  }
  </code></pre>
  
  <p>The trouble is that when I do <code>e.Button</code> it has has yields an error error:</p>
  
  <blockquote>
    <p><code>System.EventArgs</code> does not contain a definition for <code>Button</code>... </p>
  </blockquote>
  
  <p>So I fix this by changing the <code>EventArgs.e</code> to <code>MouseEventArgs.e</code></p>
  
  <p>But then there is a new error in Form1Designer where the event line is:</p>
  
  <pre><code>this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
  </code></pre>
  
  <p>The error says:</p>
  
  <blockquote>
    <p>No overload for <code>pictureBox1_Click</code> matches delegate <code>System.EventHandler</code></p>
  </blockquote>
  
  <p>How do I fix this? 
  Thanks for reading</p>