Setting the height and width of an IMG in a WebBrowser Control in a Windows Forms Application

  • Thread starter Heidi V.Hundåla
  • Start date
H

Heidi V.Hundåla

I have a WebBrowser-control on my win app and I want to set the size on the
images which are displayed through an url like http://blabla.com/img.jpg,
but somehow
the setting of my WebBrowser browseMMS -object won't apply:
((mshtml.HTMLImg)browseMMS.Document.Images[0].DomElement).height = 10;

((mshtml.HTMLImg)browseMMS.Document.Images[0].DomElement).width = 10;

The images are still shown in their original size.

Anyone?

Regards,
Heidi
 
H

Heidi V.Hundåla

I solved it by setting the size (referred to underneath) in the
browseMMS_DocumentCompleted -event

Regards,

Heidi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top