LEADTOOLS Support
Imaging
Imaging SDK Examples
Centering a mouse cursor over the center of a rasterImageViewer
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, June 12, 2008 3:18:16 AM(UTC)
Groups: Registered
Posts: 28
Using c#,wpf and version 15
is there a way to do this in a wpf app hosting a forms control that hosts the rasterviewer??
Thanks
#2
Posted
:
Thursday, June 12, 2008 10:31:04 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
LEADTOOLS doesn't have anything to move the mouse cursor. You will need to declare and use the API function SetCursorPos and ClientToScreen.
I've never tried it in WPF, but I would imagine you can get the client coordinates of the RasterImageViewer relative to the WPF form and then do the math and pass the correct point. There might be a better way to do this as far as doing the math to get the point you want, but it's more of a Windows API/WPF API issue. If you have any more questions regarding this you should contact Microsoft.
Here's an example of how to declare those API functions and center the cursor on a button.
http://swigartconsulting.blogs.com/tech_blender/2005/08/how_to_move_the.html
#3
Posted
:
Thursday, June 12, 2008 10:56:05 PM(UTC)
Groups: Registered
Posts: 28
Thats brilliant thanks, yeah I was already thinkng of using API stuff for the mouse cursor but it was the client coordinates of the RasterImageViewer that I had overlooked.
Cheers!!
LEADTOOLS Support
Imaging
Imaging SDK Examples
Centering a mouse cursor over the center of a rasterImageViewer
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.