4

I'm currently looking for a way to move the mouse in wpf. All I found was unmanaged method calls which I couldn't implement reliably. Is there an easy way to move the mouse cursor to some place, ie. after a doubleclick? I'm surely missing something here.

Femaref
  • 59,667
  • 7
  • 131
  • 173

1 Answers1

7

Add a reference to System.Windows.Forms.dll, then set Cursor.Position.

SLaks
  • 837,282
  • 173
  • 1,862
  • 1,933
  • 1
    While this might be a way, I'm quite reluctant to reference System.Windows.Forms in a WPF application. – Femaref Nov 22 '10 at 09:24
  • I know this is an old question and all but, I'm actually curious if you happened to find a way to do this without adding the System.Windows.Forms reference? – user1676874 Jul 28 '15 at 21:25