This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, March 17, 2005 10:32:57 AM(UTC)
Groups: Registered
Posts: 4
how can I center a zoom on a clicked location? I know this has been asked before. But I didn't see a good answer for it. I am using VB for developing. I am capturing the x,y coordinates in the mouse down event and trying to use them to center the image. Any help out there?
#2
Posted
:
Wednesday, August 2, 2006 7:22:00 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Please add the following code lines to your project to be able to zoom on a clicked location:
Private Sub LEAD1_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
LEAD1.ScaleMode = 3
Dim xPixels, yPixels, newWidth, newHeight
xPixels = x / Screen.TwipsPerPixelX
yPixels = y / Screen.TwipsPerPixelY
newWidth = LEAD1.ScaleWidth - 60
newHeight = LEAD1.ScaleHeight - 60
LEAD1.ZoomToRect xPixels - newWidth / 2, yPixels - newHeight / 2, newWidth, newHeight
End Sub
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.