Skip to content

Moving Cursor in DirectX Games

matt little

Asked Dec 5, 2009, 6:01 PM EST1 answer
Share
LinkedInX
I am using the Wiimote and the .NET Wiimote lib to control a game (Borderlands specifically). I have all the controls worked out accept the Aiming (what the cursor is used for).

I have tried the following code without success:

C#
         [DllImport("User32.Dll")]
        public static extern long SetCursorPos(int x, int y);

And..

Code
 Cursor.Position = new Point(positionX, positionY);

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 1 short reply
    • 0
      Anything guys...?
      0