0

Recently I moved from Python to c# and I was wondering if it was possible to move the mouse cursor to a certain pixel (x,y coordinates). I haven't found anything related to this using c#. Using python you just need to import pyautogui and that's it. I thought of maybe using System.Forms or System.Drawing but still, I found nothing. Help is appreciated

Thanks in advance.

HellGoat77
  • 53
  • 1
  • 2
  • 7
  • Does not work. x,y coordinates do not coincide with my 1920x1080 screen. eg. I put x: 818 y: 130 and the cursor goes to the up left corner. – HellGoat77 May 31 '20 at 05:16
  • 1
    _Does not work_ Yes it works fine! - Show the actual code you tried! Also: Do you have more than one monitor? Note that the link is complicating things. A simple `System.Windows.Forms.Cursor.Position = new Point(7, 777);` etc will do! Also note that if you have included the charting namespace you need to qualify! – TaW May 31 '20 at 10:31

0 Answers0