Retrieving Cursor Position

Nov 9, 2010 at 6:28 PM

I am trying to retrieve the cursor position in order to compare that it has changed after a certain action.   I have added "System.Windows.Forms" reference and was able to call Cursor.Postion.  However, I need to set the postion to a variable in order to use it later for the comparison.   What type of variable would that be?   I tried to assign it to Point type but received the message" Cannot implicitly convert type System.Drawing.Point to System.Windows.Point.

Point CurrentCursor = Cursor.Position;


Nov 10, 2010 at 4:13 PM

I have found the answer to the question... I only needed to add the System.Drawing reference to the project.  However, i need to retrieve the cursor position in a textbox.  The above code gave me the cursor position in general but not to the control.   Any suggestions?    Thanks in advance.

Nov 21, 2010 at 7:35 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.