Windows Forms Topics include: windows forms, controls, components and designers

Go Back  Xtreme .NET Talk > .NET > Windows Forms > system.windows.forms.webbrowser open link same window


Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2006, 04:32 AM
PROKA's Avatar
PROKA PROKA is offline
Junior Contributor

Preferred language:
VB.NET, C#
 
Join Date: Sep 2003
Location: Bucharest
Posts: 249
PROKA is on a distinguished road
Default system.windows.forms.webbrowser open link same window



The title says it all. I'm using a system.windows.forms.webbrowser control and I am allowing navigation, but if a link tries to open in a new window, it should open in the same (in the webbrowser from my program). How can I accomplish that?
__________________
Development & Research Department @ Elven Soft
Reply With Quote
  #2  
Old 06-03-2006, 12:17 PM
snarfblam's Avatar
snarfblam snarfblam is offline
Ultimate Contributor

Preferred language:
C#, VB
 
Join Date: Jun 2003
Location: USA
Posts: 2,097
snarfblam will become famous soon enough
Default

For starters, look at the NewWindow event. I believe that it is raised (and allows you to cancel) if any kind of popup is going to be shown. As far as intercepting the url to navigate to, I can't help you with that.
__________________
e
Reply With Quote
  #3  
Old 06-04-2006, 04:35 PM
dick_nl dick_nl is offline
Newcomer
 
Join Date: Feb 2004
Posts: 20
dick_nl is on a distinguished road
Default

If I'm not wrong there's an event raised when a link is clicked. Process that event yourself and cancel the default action... worked fine for me (in win32)...
Reply With Quote
  #4  
Old 06-09-2006, 08:20 AM
PROKA's Avatar
PROKA PROKA is offline
Junior Contributor

Preferred language:
VB.NET, C#
 
Join Date: Sep 2003
Location: Bucharest
Posts: 249
PROKA is on a distinguished road
Default

Ok so has anyone figured out some code to accomplish this?
__________________
Development & Research Department @ Elven Soft
Reply With Quote
  #5  
Old 06-09-2006, 09:37 AM
PROKA's Avatar
PROKA PROKA is offline
Junior Contributor

Preferred language:
VB.NET, C#
 
Join Date: Sep 2003
Location: Bucharest
Posts: 249
PROKA is on a distinguished road
Default

OK I managed somehow to take the link out of the activeElement. The problem is there are a lot of ways to open a new browser window: like html link or javascript function or etc etc
__________________
Development & Research Department @ Elven Soft
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New to .Net- Imports System.Windows.Forms does not appear LazRazMataz ASP.NET 5 02-19-2005 06:14 AM
'System.Windows.Forms.AxHost' in asp.net realsync ASP.NET 3 03-11-2004 12:34 PM
Access to Windows.System.Forms.Control romanhoehne Windows Forms 1 01-07-2004 07:07 AM
how to open link in same webbrowser... myemptyfilled General 2 04-25-2003 07:54 PM
System.Windows.Forms not found Iceplug Windows Forms 8 12-26-2002 09:25 AM

Advertisement:







Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe