how to get an object position relative to primary screen
<p>In C#, how can I get an object's position in form relative to primary screen?</p>

<p>I searched a little but I got really confused.</p>

<p>I get the form location and object location and summed but it wasn't correct:</p>

<pre><code>X = this.Location.X + pictureBox1.Location.X;
Y = this.Location.Y + pictureBox1.Location.Y;
</code></pre>

<p>I also tried this:</p>

<pre><code>mypoint = pictureBox1.PointToScreen(Point.Empty);
</code></pre>

<p>and this:</p>

<pre><code>mypoint =new Point(this.Location.X + pictureBox1.Location.X - Screen.PrimaryScreen.Bounds.Left,
          this.Location.Y + pictureBox1.Location.Y - Screen.PrimaryScreen.Bounds.Top);
</code></pre>

<p>I want the pictruebox1 location related to display point(0,0).
<a href="https://i.stack.imgur.com/SaRMC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SaRMC.png" alt="enter image description here"></a></p>