|
-
Apr 25th, 2000, 11:41 AM
#1
Thread Starter
Fanatic Member
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
-
Apr 25th, 2000, 04:25 PM
#2
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Apr 25th, 2000, 08:05 PM
#3
Thread Starter
Fanatic Member
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.
-
Apr 26th, 2000, 03:38 AM
#4
transcendental analytic
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.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|