Get the Internet explorer current web address from windows application

T

Tal Shachar

Hi,
I'm building a windows application, that needs to get the web address from
the current open web page, browsed using the Microsoft Internet Explorer.
The problem is that I can get the iexplore.exe process, but I can't find how
to get the address of the web page it currently displays.
Is there an API for the Microsoft Internet Explorer I can use? Does anyone
know how to get this done?
Appreciate all the help I can get.

TIA,
- Tal.
 
R

RAlvare

Hello Tal Shachar:

Could you use the System.Windows.Forms.WebBrowser class instead of
having a separate process?

WebBrowser wb = new WebBrowser();


wb.Navigate("http://www.contoso.com");

wb.DocumentCompleted += new
WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted);

static void wb_DocumentCompleted(object sender,
WebBrowserDocumentCompletedEventArgs e)

{

MessageBox.Show("Document completed, website: " + e.Url.ToString());

}
 
T

Tal Shachar

Hi,
First, thanks for your response.
Second, the thing is I need to identify if the user has an open browser, and
if so - to get its address, so I don't think that using the WebBrowser class
will serve this need (or is it I miss something here??)
Thanks,

- Tal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top