Link to home
Start Free TrialLog in
Avatar of stephenlecomptejr
stephenlecomptejrFlag for United States of America

asked on

How to adjust size of .gif to be smaller in Microsoft Access Web Browser Control?

I've got some perfect .gifs in a web browser control in Microsoft Access side by side on some entry screens.  It looks really cool.
However I'm not sure how to shrink the image as is shown on other webpages a little smaller than what it currently looks like.

Does anyone know a touch of html and where to put it for this web browser control in Microsoft Access using VBA?

Here's a sample database I put together:
The gif is taken from:

http://i.imgur.com/3h6gipf.gif

Form1 is the size I want the .gif to be
Form2 is the only way I know how to display it all
I want to reduce the size though!
EEdbsample.accdb
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

What is the current physical size and can you provide a few lines of the rendered html?  If the physical size is optimized for web already, you can typically only make images gif or jpg's smaller, not larger without distorting. However, it is still best to use the original size (use multiple images) rather than resizing in a browser.

Here is one way
  <div>
  <img src="https://www.experts-exchange.com/images/experts-exchange/topHeader/expertsExchangeLogo.svg">
  </div>
  
  <div>
    <img class="small" style="width:50px;" src="https://www.experts-exchange.com/images/experts-exchange/topHeader/expertsExchangeLogo.svg">
  </div>
  <div>
    <img class="large" style="width:300px;"  src="https://www.experts-exchange.com/images/experts-exchange/topHeader/expertsExchangeLogo.svg">
  </div>

Open in new window

And a working example https://jsbin.com/hujuyezoma/edit?html,output

I can't speak to the vba portion, but this is one way to do it with html.
Avatar of stephenlecomptejr

ASKER

Put in a sample above as to what I was talking about.
I am  not well versed in Access.  I thought you were generating html that outputs to a browser.  On the form, if you insert it as an image, then you can change the Size Mode property to zoom and it will resize.

When you insert the image through the ribbon menu, you will be prompted to select an image. Just use http://i.imgur.com/3h6gipf.gif

https://docs.microsoft.com/en-us/office/vba/api/access.image.sizemode
Yes that won't work for me because the only display of a .gif properly to keep its motion is through Microsoft Browser Web Control.
If that is the case, you will need to make the image you are bringing in the exact size you want in your form.  If you do not have a photo editing application, you can use https://pixlr.com/editor/ or https://www.fotor.com or https://www.pizap.com/photo_editor.  Just resize to what you need and either save to your drive or upload to back to imgur.
ASKER CERTIFIED SOLUTION
Avatar of stephenlecomptejr
stephenlecomptejr
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for trying to help though.  Once you posted that html stuff - I knew I had to find something similar to accomplish this.

I also start using .gifs like something that runs fast to simulate and make it seem Microsoft Access is fast upon starting up!  And it works great.