System.Windows.Forms.WebBrowser and Java and Blank Pages

J

Jon Ebersole

I am writing a class library that takes screen shots of pages of websites. I
am using System.Windows.Forms.WebBrowser to navigate to the web page. I call
the Navigate method, and then respond to the DocCompleted event handler. I
use the DrawToBitmap method to create a bitmap image and display it to the
user or save it to a file.

When I navigate to a website that has a java control on it, it always
returns a blank page. This has to be a bug in the WebBrowser control. Does
anyone have a fix or a workaround for this problem?
 
S

Steven Cheng[MSFT]

Hello Jon,

From your description, you're developing a windows form application which
use WebBrowser control to programmatically navigate some internet pages and
capture the page screenshot. However, you found some pages that contains
java control(Applet? ) will display as blank page in webbrowser, correct?

Regarding on those pages which contain java controls, can you correctly
view them if you use standard webbrowser(IE or firefox) to visit them?
Also, since java control(applet) rely on JVM installed on the client
machine, have you installed the latest version of the java JVM to see
whether it works?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
I

ilan dov

Hi Jon,
I hope you managed to solve your problem. Maybe you can help me with mine...

I am trying to write a class library that inserts page breaks in an existing
html by loading it into a System.Windows.Forms.WebBrowser and then using
mshtml to invesigate page's content. It works fine in a Windows Form but in
a class library I don't receive the DocumentCompleted event or the Navigated
event. After calling the Navigate method, the wb.Document property is not
null, but the wb.Document.Body property is. From what you wrote it seems
that you receive these events in a class library. Is there something special
that needs to be done when using System.Windows.Forms.WebBrowser in a class
library?

Thanks
Dov
 
I

ilan dov

Hi Steven ,
I noticed that Jon is using System.Windows.Forms.WebBrowser in a class
library.
I am trying to write a class library that inserts page breaks in an existing
html by loading it into a System.Windows.Forms.WebBrowser and then using
mshtml to invesigate page's content. It works fine in a Windows Form but in
a class library I don't receive the DocumentCompleted event or the Navigated
event. After calling the Navigate method, the wb.Document property is not
null, but the wb.Document.Body property is. From what Jon wrote it seems
that he managed to receive these events in a class library. Is there
something special that needs to be done when using System.Windows.Forms.
WebBrowser in a class library?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top