title: How can I get the exact location of cursor on image in Picturebox
body: <p>I have the picture box in which the image may be zoomed with different values. Then I try to find out the location of cursor on picture box. I write the following code on picture box mouse move event:</p>
  
  <pre><code>int x = (2 * e.X - pictureBox1.Width + pictureBox1.Image.Width) / (2 * _scale / 100);
  int y = (2 * e.Y - pictureBox1.Height + pictureBox1.Image.Height) / 2 * _scale / 100);
  </code></pre>
  
  <p>here _scale is is the zoomed value that may be 10,50,100,or 200 etc.</p>
  
  <h2>My Question:</h2>
  
  <p>it give the correct value if the zoomed is greater than 100%. But is the zoomed is less than 100 it give the incorrect value. How can I give the correct value if even the zoomed is less than 100% ?</p>
  
  <h2>Some More Explanation:</h2>
  
  <p>for zoomed I write the following code.</p>
  
  <pre><code>pictureBox1.Image =  new Bitmap(Orignal_image, (int)( Orignal_image .Width * scale / 100), (int)( Orignal_image.Height * scale / 100));
  </code></pre>
  
  <p><strong>EDIT:</strong> The size mode of picturebox is centerImage. and it is not necessary that the picturebox width is equal to the image. its width may be less than image, and then the image show at the center of picturebox. i only need the location of image. (i.e., the 0 pixel is given by start position of image not picturebox).</p>