-
I am using the following code given by one of the VB WORLD.COM member to zoom a picture.
Dim speed As Integer
speed = 5
With ActiveForm.Picture2
.Picture = .Image
.PaintPicture ActiveForm.Picture2, 0, 0, .ScaleWidth, .ScaleHeight, .ScaleWidth / speed, .ScaleHeight / speed, .ScaleWidth - .ScaleWidth / speed * 2, .ScaleHeight - .ScaleHeight / speed * 2
End With
The problem is that the picture is distorted when I use this method. Can anyone suggest me anothe way to Zoom out and Zoom in a picture?
Thanks.
Kinjal
-
I posted that two times, and no-one did reply. What do you mean with distorted? If you have large difference between height & width of the picture, you should consider modifying my code by setting a general zooming var or modify the scale
-
Sorry for asking the same question but since VB is new to me I only know the basics of it and nothing in deep. Also i am not at all familiar with API so I couldn't understand your code,and didn't modify it.
However thanks for your reply.
Can you please tell me whwther I can use the same code for demagnifying purpose?
Thanks a lot.
Kinjal.
-
There's nothing API about my code. Just put a negative value instead of a positive value to speed. Also, I suggest you should play around a bit with paintpicture, so that you know what you're doing.