View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jens Meier Jens Meier is offline
external usenet poster
 
Posts: 18
Default Graphics question on Excel VBA UserForm

keepITcool schrieb:
... api's not needed

but you'll need to put the image in a frame to get the "panning"
mechanism that forms.imagecontrol doesnt have.

you'll only load the large hires picture but control the size of the
imagecontrol. (sizemode must be set to zoom)

Could keep the scrollbars hidden and manipulate the scrolltop.left/ etc
with a few buttons.


Hi keepITcool,

thanks a lot for your reply. I guess this is a really helpful approach.
But unfortunately I was unable to fully understand what your code does.

Here is what I did: I created a UserForm with a Form and an Image object
inside the Form. Then I loaded a picture (the supposed low-resolution
image) into the Image. After showing the userform, the image filled the
whole frame, and on clicking the image, it resized to its original size
(no stretch).

At this point I got stuck. How can I reach that on clicking the image
the high-res image is loaded and zoomed/panned to the right spot?
Actually, only panning the high-res image would be enough.
I tried to play with the ScrollWidth/Height/Top/Left properties, but
could not see any effect on the behaviour of the userform.

As I think we got quite close to the thing (I've been searching for
quite a while now...), I would really appreciate further help!
Thank you,
Jens