|
-
Feb 29th, 2008, 10:45 AM
#1
Thread Starter
New Member
.Net WebBrowser
Hi all, I seem to have found a little flaw in .Net WebBrowser and myself i cant seem to work around it. Basically, If you use the WebBrowser from the toolbox (C#/VB.Net/C++.Net), code what you want etc etc. Then if you goto a page that normally when you click a link, it will open a new browser window, the .Net WebBrowser seems to start IE. Now i know this is based on what ever version of web browser you have, but thats not my point. My current point is that the event handler of WebBrowser called "NewWindow" doesnt contain the URL of the new window being loaded. Now being the .Net there is always 2 ways to do something, so i added a new reference("Microsoft Web Browser"/"Schdocvw.dll"). Once i done that i fixed my problem easy, i dont know what to call this realy is it a bug or is there another way? gimme your thoughts guys 
ps: Im new Hi
-
Mar 10th, 2008, 02:40 PM
#2
Re: .Net WebBrowser
Hi. Welcome to the forums. What do you mean by "doesn't contain the URL of the new window being loaded"? Do you mean it opens up a new IE window with about:blank?
-
Mar 10th, 2008, 03:40 PM
#3
Thread Starter
New Member
Re: .Net WebBrowser
 Originally Posted by mendhak
Hi. Welcome to the forums. What do you mean by "doesn't contain the URL of the new window being loaded"? Do you mean it opens up a new IE window with about:blank?
Well, It fires a new window. But doesnt contain the destination URL. My plan was to catch the windows and load it all in the same browser. (keeping it nice and simple in one window, Even for new links) But since the new window event doesnt contain the URL it causes me issues, as i can stop the window loading, but have no clue where to send the old one.
-
Mar 10th, 2008, 04:10 PM
#4
Re: .Net WebBrowser
What are you using for this? VB or C# as this sounds mmore like a coding problem rather then a discussion on the framework?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 10th, 2008, 05:11 PM
#5
Re: .Net WebBrowser
How about handling the _Navigating() event? If you get the URL there, cancel it, and then send it off in the same browser window?
Something like that at least, you only need to intercept the event, don't you?
-
Mar 11th, 2008, 07:06 AM
#6
Thread Starter
New Member
Re: .Net WebBrowser
 Originally Posted by mendhak
How about handling the _Navigating() event? If you get the URL there, cancel it, and then send it off in the same browser window?
Something like that at least, you only need to intercept the event, don't you?
Navigating() event doesnt contain weather its a new window or not..
-
Mar 11th, 2008, 06:41 PM
#7
Re: .Net WebBrowser
But if you always handle it, you don't really need to know if it's a new window or not, as long as you can intercept the URL?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|