So I came across a recent question on UtterAccess
format size web browser control
I have a client that uses access 2019 which dosn't support the new edge web browser control, is there a way to format or resize the image or website in the old one. i have images on line they need to see and they don't fit the box size of the browser control like it does on the new edge control or is there a different want to view it? Images are stored on line i don't want to have to down load them to use them.
and figured I’d share something I had done many years ago.
So, I went digging, and well, couldn’t locate the project. 🙁
So, I figured I had done it once, I could simply do it again and I did.
The entire thing here is resizing the image isn’t complicated, but preserving the aspect ration is a little tricky. Normally, we would simply apply the desired height/width attributes to the image itself, but that will distort the image. I also didn’t want to get into downloading the images locally to be able to read their size properties (height/width) to then be able to calculate the proportional dimensions to respect the desired size, just not efficient and a waste of I/O operations… So we need another approach.
I should also quickly mention that the following is a solution for the old Web Browser control and there is simpler code to do the same thing in the Modern Web Browser control (maybe another article in the coming days/weeks).
Continue reading →