View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Graphics question on Excel VBA UserForm

as I said..

you load the hires picture (which initially is shown as a thumbnail.)

IF you want to actually swap hires and lores pictures
(reread from disk) you must include some code to do that.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jens Meier wrote :

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