Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Tue, 29 Apr 2008 15:57:54 +0800,    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


how to set WebBrowser's CSS   
Hi all,
I'm programing with WebBrowser to implement an browser of myself, problem found when I set html string like this->

webBrowser1.DocumentText = "<html><head><title>xxxxx<title><link href='http://domainname/template/style1.css' rel='stylesheet' type='text/css'/></head>some text<html>";

when the program executing, the browser control waitting here for something, progress bar is frozen, is there any sugguestion about this?

thanks and best reguards,

Robin
date: Tue, 29 Apr 2008 15:57:54 +0800   author:   Robin Zhang

Re: how to set WebBrowser's CSS   
You can implement IDocHostUIHandler::GetHostInfo to supply a host CSS, but
there is a bug in .Net 2.0 that prevents your IDocHostUIHandler
implementation being called. You need to use the ActiveX directly, or use a
third party class such as the one in
www.codeproject.com/KB/miscctrl/csEXWB.aspx.

-- 
Sheng Jiang
Microsoft MVP in VC++
"Robin Zhang"  wrote in message
news:EF9AE6FC-41BC-4010-82CE-4A2420CD41AD@microsoft.com...
Hi all,
I'm programing with WebBrowser to implement an browser of myself, problem
found when I set html string like this->

webBrowser1.DocumentText = "<html><head><title>xxxxx<title><link
href='http://domainname/template/style1.css' rel='stylesheet'
type='text/css'/></head>some text<html>";

when the program executing, the browser control waitting here for something,
progress bar is frozen, is there any sugguestion about this?

thanks and best reguards,

Robin
date: Wed, 30 Apr 2008 13:51:06 -0600   author:   Sheng Jiang[MVP] uss

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us