Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
QuestionNot working : Wmv file to Flv file using C# Pin
elango.sham3-Oct-08 20:24
elango.sham3-Oct-08 20:24 
QuestionHow to get mouse pointer of object after using Graphics.ScaleTransform()? Pin
cocoonwls3-Oct-08 18:08
cocoonwls3-Oct-08 18:08 
AnswerRe: How to get mouse pointer of object after using Graphics.ScaleTransform()? Pin
cocoonwls15-Oct-08 0:10
cocoonwls15-Oct-08 0:10 
QuestionWebBrowser Control and Images Pin
#realJSOP3-Oct-08 17:18
professional#realJSOP3-Oct-08 17:18 
AnswerRe: WebBrowser Control and Images Pin
Jaime Olivares3-Oct-08 19:21
Jaime Olivares3-Oct-08 19:21 
GeneralRe: WebBrowser Control and Images [modified] Pin
#realJSOP3-Oct-08 22:48
professional#realJSOP3-Oct-08 22:48 
GeneralRe: WebBrowser Control and Images Pin
Jaime Olivares4-Oct-08 2:16
Jaime Olivares4-Oct-08 2:16 
GeneralRe: WebBrowser Control and Images Pin
#realJSOP4-Oct-08 2:35
professional#realJSOP4-Oct-08 2:35 
I didn't say the control couldn't. I was saying I can't get it to. Here's the code:

private string BuildHtml()
{
	StringBuilder builder = new StringBuilder("");
	builder.Append("<html>");
	builder.Append("<head>");
	builder.AppendFormat("<base href='{0}' />", Application.StartupPath);

	// this line doesn't appear to have any effect
	//builder.Append("<link rel='stylesheet' type='text/css' href='cpam.css' />");

	// but this code works
	builder.Append("<style>");
	builder.Append("body { font-family:arial; font-size:11pt; }");
	builder.Append(".articleTable { width:100%; border:0; background-color:Black; ");
	builder.Append("                font-family:arial; font-size:11pt; }");
	builder.Append(".darkRowChanged { background-color:#B1E3FF; }");
	builder.Append(".lightRowChanged { background-color:#E5F6FF; }");
	builder.Append(".darkRow { background-color:#EEE; }");
	builder.Append(".lightRow { background-color:white; }");
	builder.Append(".descText { font-size:9pt;color:#777;margin-top:3; }");
	builder.Append(".titleText { font-weight:bold; font-style:italic; }");
	builder.Append(".headerRow { background-color:#999; height:20px; line-height:20px; }");
	builder.Append(".dataRow { height:60px; }");
	builder.Append("</style>");

	// closing open tags
	builder.Append("</head>");
	builder.Append("<body>\n");
	builder.Append("</body>");
	builder.Append("</html>");
	return builder.ToString();
}

// usage 
this.webBrowser1.Navigate("about:blank");
HtmlDocument doc = this.webBrowser1.Document;
doc.Write(string.Empty);
this.webBrowser1.DocumentText = BuildHtml();


I've also tried the following to get the file:

href="./cpam.css"
href="c:\fully\qualified\path\cpam.css"

I have a feeling that if I can find out why either images won't display or the css file won't load, the whole thing will fall into place. I simply don't know what I've missed here, and finding info with google on this problem is impossible because of the lack of documentation anywhere concerning the webbrowser control.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: WebBrowser Control and Images Pin
Jaime Olivares4-Oct-08 2:50
Jaime Olivares4-Oct-08 2:50 
GeneralRe: WebBrowser Control and Images Pin
#realJSOP4-Oct-08 3:13
professional#realJSOP4-Oct-08 3:13 
GeneralRe: WebBrowser Control and Images Pin
Wendelius4-Oct-08 7:14
mentorWendelius4-Oct-08 7:14 
GeneralRe: WebBrowser Control and Images Pin
#realJSOP4-Oct-08 8:42
professional#realJSOP4-Oct-08 8:42 
QuestionCannot implicitly convert type 'System.Web.UI.Control' to 'System.IO.MemoryStream' Pin
technette3-Oct-08 13:51
technette3-Oct-08 13:51 
AnswerRe: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.IO.MemoryStream' Pin
Jaime Olivares3-Oct-08 19:33
Jaime Olivares3-Oct-08 19:33 
Questioncompare 2 datetime and get hours Pin
Mohammed Elkholy3-Oct-08 9:36
Mohammed Elkholy3-Oct-08 9:36 
AnswerRe: compare 2 datetime and get hours Pin
J4amieC3-Oct-08 9:56
J4amieC3-Oct-08 9:56 
AnswerRe: compare 2 datetime and get hours Pin
J$3-Oct-08 9:59
J$3-Oct-08 9:59 
QuestionPut sound on own simple program Pin
MorganSim3-Oct-08 8:46
MorganSim3-Oct-08 8:46 
AnswerRe: Put sound on own simple program Pin
DaveyM693-Oct-08 9:04
professionalDaveyM693-Oct-08 9:04 
QuestionRe: Put sound on own simple program Pin
MorganSim3-Oct-08 10:22
MorganSim3-Oct-08 10:22 
AnswerRe: Put sound on own simple program Pin
Dan Neely3-Oct-08 10:32
Dan Neely3-Oct-08 10:32 
AnswerRe: Put sound on own simple program Pin
DaveyM693-Oct-08 10:58
professionalDaveyM693-Oct-08 10:58 
AnswerRe: Put sound on own simple program Pin
PIEBALDconsult3-Oct-08 9:37
mvePIEBALDconsult3-Oct-08 9:37 
QuestionRe: Put sound on own simple program Pin
MorganSim3-Oct-08 9:51
MorganSim3-Oct-08 9:51 
AnswerRe: Put sound on own simple program Pin
PIEBALDconsult3-Oct-08 10:23
mvePIEBALDconsult3-Oct-08 10:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.