WebBrowser NewWindow


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: WebBrowser NewWindow

  1. #1
    Join Date
    Feb 2005
    Posts
    103

    WebBrowser NewWindow

    I have a WebBrowser on my form for my application that I am building.

    Problem:
    When the user is navigating on the WebBrowser and clicks a link to open a new page, I want the Browser to open the Link in the same Browser instead of opening IE.exe.

    Any help is appreciated,

    ky

  2. #2
    Join Date
    Nov 2005
    Posts
    7
    hi

    add the attribute with value such as target="_self" in the hyperlink tag then the new page will be open in the same window

  3. #3
    Join Date
    Dec 2003
    Posts
    2,750
    See if the the below Microsoft KB article helps. I don't believe this is the default behavior unless the link is forcing a new window.

    How To Use the WebBrowser Control NewWindow2 Event
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  4. #4
    Join Date
    Feb 2005
    Posts
    103
    Thank you Paul,

    Yes the link was forcing a new window, but as I saw in the Microsoft Code that it creates a New FrmMain(my browser) and lets the new page be shown in a sub FrmMain instead of a new window by Internet Explorer.

    Thanks again

  5. #5
    Join Date
    Dec 2003
    Posts
    2,750
    OK, now I'm confused. Do you want the link to be displayed in the existing WebBrowser control or in IE? So far I've been unable to reproduce the behavior where it would launch in another browser window (w/o specifying that it should do so using HTML code in the actual link).
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  6. #6
    Join Date
    Feb 2005
    Posts
    103
    Yes I wanted the link that was clicked to be displayed in the existing browser, but the code from Microsoft works fine and creates a New frmMain with the link opened in the New frmMain.

  7. #7
    Join Date
    Dec 2004
    Posts
    717
    Let me tell you again how I understand your question is you created your own browser.Then you browse the page from the your browser.. If you click a link of the page that is displayed in your browser to open new browser [ in IE Shift+Click], you want your browser to open and display the page that you want. [ You don't want IE to open instead of your own browser.. ]
    Well, If my understanding is right, I like to suggest you one thing.. You should create one installer for your own browser.. Then, you shoud add one option to set default broswer of Windows.. After installation, you set your browser as default browser and then, whenever you open new windows, your browser will be opened instead of IE.. Other thing is that you don't need to find other resources and all you need to do is that create normally browser and set it as default.. :-)
    Let me know if my understanding is wrong.....
    Best Regards,
    Michael Sync
    http://michaelsync.net

    The more you share,The more you get

  8. #8
    Join Date
    Feb 2005
    Posts
    103
    The browser I created isn't a browser I want to set as Default, I just don't want it opening in there DEFAULT(usually IE) browser. The browser in my application isn't the "main" part of the application its just there to find images to be edited and ehanced by my image editor.

Similar Threads

  1. Putting text into a WebBrowser
    By Keithuk in forum VB Classic
    Replies: 2
    Last Post: 10-29-2005, 08:57 AM
  2. WebBrowser control...
    By FLD in forum Enterprise
    Replies: 2
    Last Post: 11-20-2000, 11:34 AM
  3. WebBrowser control...
    By FLD in forum ASP.NET
    Replies: 0
    Last Post: 10-20-2000, 02:41 PM
  4. WebBrowser control...
    By FLD in forum Web
    Replies: 0
    Last Post: 10-20-2000, 02:41 PM
  5. WebBrowser Loses Focus (Ctrl-F3 won't work)
    By Jason Savard in forum VB Classic
    Replies: 0
    Last Post: 08-03-2000, 08:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center