Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2006

Tip: Looking for answers? Try searching our database.

Customizing the WebBrowser control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scarleton@gmail.com - 11 Aug 2006 22:20 GMT
I am embeding the WebBrowser in my application to show reports.  I
would like to embed the graphics and the CSS files in a resource.  To
do this I need to "hook" the WebBrowser control so that when it goes
looking for these files, I can give it the files from the resource.
Any thoughts on how to do this?  It does NOT look possible, at the
moment.

Sam
David Jessee - 14 Aug 2006 16:57 GMT
geez...I can only think of one way to really do this well...its a little
hairy, though.

Get the report Manually (via System.Web.HttpRequest).  Then parse the
response text with a regex, looking for any <link> elements that hool in css
docs....remove those links and then add in the ones you want.
As for getting the css files out of the local assembly, you can always write
them to the temp directory and ahve the LINK elements use a file://
reference.  I don't know if there's a way to get the resource out using the
res:// protocol....might be worth looking into, though

> I am embeding the WebBrowser in my application to show reports.  I
> would like to embed the graphics and the CSS files in a resource.  To
[quoted text clipped - 4 lines]
>
> Sam
scarleton@gmail.com - 15 Aug 2006 18:24 GMT
> geez...I can only think of one way to really do this well...its a little
> hairy, though.
[quoted text clipped - 6 lines]
> reference.  I don't know if there's a way to get the resource out using the
> res:// protocol....might be worth looking into, though

Yea, I am currently doing something like that right now.  I was hoping
that there was a way to intercept the WebBrowser control at some low
level so that it would give me a change to provide the external file
rather then it go looking for it.  Oh well;)

Sam

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.