Getting mouse position in c#

c#, mouse-position

Solution

You should use System.Windows.Forms.Cursor.Position: "A Point that represents the cursor's position in screen coordinates."

Problem

How do I get the mouse position? I want it in term of screen position. I start my program I want to set to the current mouse position. ``` Location.X = ?? Location.Y = ?? ``` Edit: This must happen before the form is created.

Original source