Taffy11

Hi All,

I am developing a windows application that will retrieve the url address from a internet explorer window, using c# within the .net environment (2.0). Is this possible and can you provide me with either examples or references. Thanks,

Kelvin



Re: Visual C# General Retrieving URL from IE

Suprotim Agarwal

hi,

Are you using the WebBrowser Control inside your application

HTH,
Suprotim Agarwal

-----
http://www.dotnetcurry.com
-----






Re: Visual C# General Retrieving URL from IE

Taffy11

I am curently investigating the use of the webbrowser, however it appears that webbrowser are only concerned with the use of internet explorer windows that either originate or are contained within the application (is this ocrrect ).

What I want to develop is :

A application that will monitor an internet explorer window which is not related to my app. The user should be a ble to open internet explorer as usual and the application should be able to pick up the url address used.

Thanks for your input on this, its most appreciated.

Kind Regards,

Kelvin





Re: Visual C# General Retrieving URL from IE

© ???? ???????, ²Ȧ7?

Hi Taffy! Please take a look at the following article in Codeproject.com:

http://www.codeproject.com/csharp/automatinginternetexplore.asp

You will find an answer to your question, how to automate Internet Explorer and get some stuff from it.


Hope this helps,
Timo Salomaki





Re: Visual C# General Retrieving URL from IE

Taffy11

The article you referenced, create a new instance of the internet explorer process. What I want is to gather the details from a already craeted internet explorer (the explorer could already be running before the app is started).

Please tell me if i have mis read. Thanks,





Re: Visual C# General Retrieving URL from IE

OmegaMan

I provide such an example of getting IE's current url from a seperate C# application in my article entitled, Access Explorer and Internet Explorer in C# on my blog. HTH





Re: Visual C# General Retrieving URL from IE

Taffy11

Brilliant just what I was looking for, thanks. I do however have another question.

Is there any way in which I can get my application to refresh if the url changes. Thanks,





Re: Visual C# General Retrieving URL from IE

Fábio

I think the best way to do this is to make a timer to check wether the url of the internet explorer has changed and from there make the changes from your application. Also, don't forget to mark as answered the post from the buddy up there.






Re: Visual C# General Retrieving URL from IE

Taffy11

I have implemented a timer and it works like a charm. Thanks,





Re: Visual C# General Retrieving URL from IE

Sheng Jiang (?)

A WindowRegistered event is fired by the ShellWindows object after each shell window is created

see http://www.codeproject.com/shell/AutomateShellWindow.asp