Hi all,
I have a picture box displaying an image and I have a context menu with a zoom option. When i put the two together i get a picture box that allows you to zoom into the image. The problem that i have is that it only zooms intio one point. I want to be able to set the focus of the zoom to be the mouse position when the right click is activated.
I can get the mouse position, how do i then tell the zoom to use these co ordinates?
here is my code.
Dim MouseLoc As Point
MouseLoc = bxImageView.PointToClient(Cursor.Position)
bxImageView.SizeMode = PictureBoxSizeMode.StretchImage
bxImageView.Width = CInt(bxImageView.Width * 1.25) '
bxImageView.Height = CInt(bxImageView.Height * 1.25) '
Many thanks,
Noel.
I have a picture box displaying an image and I have a context menu with a zoom option. When i put the two together i get a picture box that allows you to zoom into the image. The problem that i have is that it only zooms intio one point. I want to be able to set the focus of the zoom to be the mouse position when the right click is activated.
I can get the mouse position, how do i then tell the zoom to use these co ordinates?
here is my code.
Dim MouseLoc As Point
MouseLoc = bxImageView.PointToClient(Cursor.Position)
bxImageView.SizeMode = PictureBoxSizeMode.StretchImage
bxImageView.Width = CInt(bxImageView.Width * 1.25) '
bxImageView.Height = CInt(bxImageView.Height * 1.25) '
Many thanks,
Noel.