Hi!
Is there a way to get the URL when the user opens a web page with a common web browser?
Thanks.
This is a discussion on Getting the URL within the C# Programming forums, part of the General Programming Boards category; Hi! Is there a way to get the URL when the user opens a web page with a common web ...
Hi!
Is there a way to get the URL when the user opens a web page with a common web browser?
Thanks.
Some useless programs i've wrote : slprogrammersheaven
My amature IT Blog: http://everything-geeky.blogspot.com/
My Flash games: http://flashweed.blogspot.com/
(and, sorry for my amature english in the posts)
whoa that was neat, and it works, thanks. Now the problem is for other browsers like Chrome and Firefox. How to do the same thing with other browsers
.
Some useless programs i've wrote : slprogrammersheaven
My amature IT Blog: http://everything-geeky.blogspot.com/
My Flash games: http://flashweed.blogspot.com/
(and, sorry for my amature english in the posts)
You can use this project which will allow you to use Dynamic Data Exchange with all the browsers. Then you'd use code like
This will work with "IExplore", "Netscape", "Mosaic", "Netscp6", "Mozilla", "Firefox" at the least, don't see any reason why it wouldn't work with Chrome, but you may have to play around with the library if Google didn't use "Chrome" as the DDE name.Code:using NDde.Client; ... rest of your class ... DdeClient dde = new DdeClient("Firefox", "WWW_GetWindowInfo"); dde.Connect(); string url = dde.Request("URL", int.MaxValue); dde.Disconnect();
Oh, and compared to the IE method above this is really slow.