Windows Develop Bookmark and Share   
 index > Windows Forms General > Load webBrowser with a stream
 

Load webBrowser with a stream

I'm trying the the new WebBrowser in 2.0. If i do like this:

webBrowser.URL = @"c:\word.doc";

Then the document is loaded into the webbrowser and word is fired into it. My problem is that i would like to set a stream to the webbrowser and then word would be fired up into the browser.

webBrowser.DocumentStream = myStream;

But when i do like this the browser dodn't do anything or loads a bit of text and some other funny characters. The qustion here is how do i load the stream with the proper data?

regards!

MigrationUser 1  Thursday, April 14, 2005 1:39 PM
This is not possible, because the WebBrowser control's DocumentStream property assumes the stream contains HTML. As you mention, loading from a file works as expected.
wilsone8  Sunday, May 27, 2007 4:17 AM

You can use google to search for other answers

Custom Search

More Threads

• Datagrid-Checkbox-Check for empty or unselected - WinForms
• Zebra barcode printing problem
• Checkbox with long text property
• Comparing 2 colors
• Handles Count grows large in Windows 2003 R2
• Problem with calling a ProcessStartInfo from within application.
• TextBox selection with cursor positioned at the beginning of selection (instead of end)
• Web vs Form List Control -- DataSource related members different
• Populating a treeview recursively
• Windows Form only Displays part of a Graphic After Publish