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

Discussion in 'ASP .Net Web Controls' started by Jon Ebersole, Feb 26, 2007.

  1. Jon Ebersole

    Jon Ebersole Guest

    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?

    --
    Jon Ebersole
    Microsoft Certified Solution Developer
    Jon Ebersole, Feb 26, 2007
    #1
    1. Advertising

  2. 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.
    Steven Cheng[MSFT], Feb 27, 2007
    #2
    1. Advertising

  3. Jon Ebersole

    ilan dov Guest

    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
    ilan dov, Aug 23, 2007
    #3
  4. Jon Ebersole

    ilan dov Guest

    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
    ilan dov, Aug 27, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    2
    Views:
    1,446
    Tommy
    Feb 13, 2004
  2. Nathan Sokalski
    Replies:
    5
    Views:
    1,002
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  3. Nathan Sokalski
    Replies:
    4
    Views:
    280
    Nathan Sokalski
    Dec 21, 2006
  4. Nathan Sokalski
    Replies:
    4
    Views:
    316
    Nathan Sokalski
    Dec 21, 2006
  5. Alex Rybalov

    asp pages randomly showing as blank white pages

    Alex Rybalov, May 27, 2004, in forum: ASP General
    Replies:
    2
    Views:
    283
    Alex Rybalov
    May 27, 2004
Loading...

Share This Page