Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WebBrowser control questions

WebBrowser control questions

Scheduled Pinned Locked Moved C#
helpcomquestionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GriffonRL
    wrote on last edited by
    #1

    Hello, When playing with the webbrowser control I realized two things: - If I call Navigate("about:blank"...) and the line after Navigate("http://www.test.com/"...), the first call 'about:blank' never fire a beforeNavigate2,NavigateComplete and DocumentComplete events and the webbrowser is not loaded with the blank page. Of course the second call properly load the page and all events are fired. How is it possible to make sure that both Navigate calls are going to work ? - When I use Webbrowser.Stop() it seems that it doesn't prevent the browser to continue loading parts of the page and fire Before,Complete & so on events. Maybe the problem is related to the other because I try to call first Webbrowser.Stop() and I call Navigate ("about:blank"...) the line after to empty the Webbrowser. I'm not sure the WebBrowser.Stop() is executed but the second call "about:blank" fire before,complete & so on events and works. How is it possible to make that the Webbrowser.Stop() call works ? And if Stop() doesn't do it, how is it possible to prevent the load of parts of the page ? Any help will be greatly welcome, R. LOPES Just programmer.

    S 1 Reply Last reply
    0
    • G GriffonRL

      Hello, When playing with the webbrowser control I realized two things: - If I call Navigate("about:blank"...) and the line after Navigate("http://www.test.com/"...), the first call 'about:blank' never fire a beforeNavigate2,NavigateComplete and DocumentComplete events and the webbrowser is not loaded with the blank page. Of course the second call properly load the page and all events are fired. How is it possible to make sure that both Navigate calls are going to work ? - When I use Webbrowser.Stop() it seems that it doesn't prevent the browser to continue loading parts of the page and fire Before,Complete & so on events. Maybe the problem is related to the other because I try to call first Webbrowser.Stop() and I call Navigate ("about:blank"...) the line after to empty the Webbrowser. I'm not sure the WebBrowser.Stop() is executed but the second call "about:blank" fire before,complete & so on events and works. How is it possible to make that the Webbrowser.Stop() call works ? And if Stop() doesn't do it, how is it possible to prevent the load of parts of the page ? Any help will be greatly welcome, R. LOPES Just programmer.

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      Because of the multi-threaded nature of IE, the WebBrowser.Stop() method doesn't work well. Multiple framed pages only worsen the situation. In fact, the navigation toolbar does not work as soon as you have more than one frame in the web page. I believe that you can't stop the loading of a page once it's started. It's really up to you to filter out the html code by having it loaded separately and ask IE to process it.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups