Jan 11 2021 08:21 PM
Hi,
I need some help achieving the following.
How to limit URL image size in MS Access form. Reduce size to match the container. ie the image is large an exists at URL\xxxx. I want to pull this image back and present it in a form. I want the image to resize itself to fit the container box I create.
I have many images located at many URLs. However all these pictures are like the size of wallpapers. I want to show these images in my form but at a much smaller size
At the moment I have a box 5cm x 6 cm and the box produces scroll bars and shows me all the white space in the top left of that picture. I want the URL picuture to scale to fit the box and thus show me the meaningful content.
Can it be done?
I need step by step instructions if possible
thank you in advance
JG
Jan 12 2021 06:28 AM
You could study the demo that can be downloaded from my project VBA.PictureUrl .
It scales the downloaded images to fit within the picture control.
Jan 12 2021 12:24 PM
Have you tried simply changing the image control's Size property and setting it to Zoom?
Another option is to resize the original images to the dimensions of your control, you can easily do so using WIA, see:
https://www.devhut.net/2017/01/18/vba-resize-image/
Jan 12 2021 01:27 PM
Not sure why my reply didn't go through, let's try this again?!
Have you tried setting the Size property for the image control to Zoom? See: https://docs.microsoft.com/en-us/office/vba/api/Access.Image.SizeMode
The alternative is to dynamically resize the images which can easily be done using WIA, see: https://www.devhut.net/2017/01/18/vba-resize-image/
Jan 12 2021 03:48 PM
Jan 12 2021 03:50 PM
Jan 12 2021 04:36 PM
Jan 13 2021 01:07 AM
@GomesGomes I guess not. The demo works right away, and the code is copy-paste.