Microsoft Web Browser Control

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
I have the microsoft web browser control on my form to display images and i was wondering how to set the margins so there isnt so much white space on the top and left side.

I would have used a picturebox but some of the images are too big to fit in it.

EDIT:
also.. what is the code to display "loading" and "done" in the status bar?
I put a status bar on my form and tried statusbar1.text = axwebbrowser1.statustext but it gives me an error.
 
Last edited:
Lanc1988 said:
I have the microsoft web browser control on my form to display images and i was wondering how to set the margins so there isnt so much white space on the top and left side.

I would have used a picturebox but some of the images are too big to fit in it.

EDIT:
also.. what is the code to display "loading" and "done" in the status bar?
I put a status bar on my form and tried statusbar1.text = axwebbrowser1.statustext but it gives me an error.
C#:
webBrowser1.Navigate("about:blank");
mshtml.IHTMLDocument2 currentDoc = (mshtml.IHTMLDocument2)webBrowser1.Document.DomDocument;
mshtml.IHTMLElement bodydisp = currentDoc.createElement("body");
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)currentDoc;
doc.appendChild((mshtml.IHTMLDOMNode)bodydisp);
mshtml.HTMLBody bdy = (mshtml.HTMLBody)bodydisp;
bdy.leftMargin = "0pt";
bdy.topMargin = "0pt";
bdy.innerHTML = "<img top=\"0\" left=\"0\" src=\"http://www.obj-tec.com/hotchick.gif\" />";
 
Last edited:
Back
Top