tags:

views:

561

answers:

2

I'm developing new cafe software in VB.Net and I need to get the url from the web browser. How can I get the current url from any web browser using VB.Net only? (Not ASP.NET)

A: 

Which browser? Which instance? Which tab? I typically have at least three different kinds of browser open (some things here at work require IE, I use Chrome for surfing SO sites, and Firefox for most everything else), and each of those will likely multiple tabs open. Even (or especially) at a cyber cafe, users will want to be able to use the browser(s) of their choice.

Joel Coehoorn
Why do you use Chrome just for SO ?
Clement Herreman
Other things, too, but I have some must-have extensions in firefox. Chrome came out about the same time as SO, so I used SO to try out chrome, and it kind of stuck like that.
Joel Coehoorn
+1  A: 

Maybe you should consider writing a Windows Forms program and hosting the WebBrowser Control in the form. That way, you'll have all the control you want. In fact, you get to add the forward and back buttons and all the "UI" stuff on your own, and use them to control the WebBrowser Control.

It took me about 15 minutes last time I tried.

John Saunders
15 minutes for a very simple version and a bit more to support popups/session, etc...
kenny
True. Didn't try to deal with pop-ups. Doesn't it keep cookies with no help? This 15 was a repro in .NET of the 15 I did back in VB5 (6?) when I learned about the WebBrowser ActiveX control and didn't believe it.
John Saunders