We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
Putting a Browser into Your Windows Application
|
| Subject: |
|
web browser and Images in win application? |
| Date: |
|
2006-05-30 05:50:36 |
| From: |
|
nsn_82
|
|
|
i use follow functions for loadind my html pages,there are some pictures in my source code of html page , that have relative src ,
when the browser navigate , the pictures didn't show!!!
what can i do??
private void Form2_Load(object sender, System.EventArgs e)
{
object empty = System.Reflection.Missing.Value;
axWebBrowser1.Navigate("about:blank", ref empty, ref empty, ref empty, ref empty);
}
public void html_load(string context,string title)
{
string SourceCode="";
SourceCode="<html><head></head><body>" + context+ "</body></html>";
// create an IHTMLDocument2
mshtml.IHTMLDocument2 doc = axWebBrowser1.Document as mshtml.IHTMLDocument2;
// write to the doc
doc.clear();
doc.writeln(SourceCode);
doc.close();
}
|