Shdocvw Web Browser Zoom Control

I am using a web browser control from shdocvw.dll to create an html image viewer that I automatically control. Some of the images I download are quite sizable in resolution, so I would like to be able to automatically scale up the control to the content level and would like to support it in IE6. Is it possible?

0


source to share


1 answer


Could you write javascript code to modify width

and height

images so that they fit into the box? Something like:

var img = document.getElementById('the-image-id');
img.width = window.innerWidth * 0.9;
img.height = window.innerHeight * 0.9;

      

You can even add an image click handler to enlarge:



function zoomin() {
  this.width = '';
  this.height= '';
}
img.click = zoomin;

      

Is this what you are looking for?

0


source







All Articles