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. Navigation in the same window for WebBrowser Control

Navigation in the same window for WebBrowser Control

Scheduled Pinned Locked Moved C#
csharptutorial
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.
  • K Offline
    K Offline
    kayhustle
    wrote on last edited by
    #1

    I need to know how to keep the navigation in the same window using the WebBrowser Control. It's NewWindow event does not have the URL in it. I read about SHDocVw.WebBrowser_V1, interface, which has a better NewWindow event, but I don't know how to make the cast from the WebBrowser control in C#. I've noticed that the msdn article on this is in VB. Thanks.

    N 1 Reply Last reply
    0
    • K kayhustle

      I need to know how to keep the navigation in the same window using the WebBrowser Control. It's NewWindow event does not have the URL in it. I read about SHDocVw.WebBrowser_V1, interface, which has a better NewWindow event, but I don't know how to make the cast from the WebBrowser control in C#. I've noticed that the msdn article on this is in VB. Thanks.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      If you are using Windows XP SP2 you should check into a new event that has been defined, DWebBrowserEvents2::NewWindow3 Event[^]. You will want to check the dwFlags which will be a NWMF[^] enumeration. This should get you started. - Nick Parker
      My Blog | My Articles

      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