Link to home
Start Free TrialLog in
Avatar of windsofchange
windsofchange

asked on

setting MousePosition

hi

in a scrollable control i want to press the right mousebutton and while moving the mouse the autoscrollposition changes. (its actually the same than dragging the scrollbars with the left mousebutton)
this works so far. but now i want the mousecursor to stay where it is and only the control to be scrolled. (its the same navigation, that map-oriented role-games use)

or:

how can i SET the MousePosition?

thanks!
Avatar of _TAD_
_TAD_



MousePosition.X = ##;
MousePosition.Y = ##;


But I don't think this will really help you


I guess what I mean is that if you are clicking and dragging a control, then I am pretty sure that the control is linked to the mouse position.  If you want to have the mose position constant then I think you may not get your desired affect.


However, you could have the mouse snap back to its original position after the move... This would allow you to move your control, and then as soon as you are done the mouse would return to the place where it started
How about if you use the MouseButtons property to determine when the right button is pressed, and make the mouse pointer invisible during that time?  This way, it is moving but they would not see it so it would not be a distraction.  Then when the button is released, make it visible again.

Good luck,

Tony
I think you can only "get" MousePosition.  Can you also "set" it?
ASKER CERTIFIED SOLUTION
Avatar of _TAD_
_TAD_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial


I think what you may want to do is hide the cursor (or mouse ICON), and then let the user move it around at will... then at the end, just before you show it you put it back to it's original position.
TAD:

Great idea!  I wish I'd thought of that!

:-)

Tony
Avatar of windsofchange

ASKER

thanks!
thats what i was looking for (didnt think of looking in the Cursor props)