Click here to Skip to main content
15,913,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need C# experts help:
I`m building a IE Toolbar.Extending Explorer with Band Objects using .NET and Windows Forms.
How to get IE navigation address (URL) and write in to .txt or .xml file.

eg. I record to IE address bar "www.google.com" and i`m get to file www.google.com. how to get this information from IE?
Posted

An object of ShellWindowsClass will have all the IE windows related information. You can loop through them and the current URL. Like this:

C#
ShellWindowsClass windows = new ShellWindowsClass();

foreach (InternetExplorer internetWindow in windows)
{
string url = internetWindow.LocationURL;
}
 
Share this answer
 
When i use

foreach (InternetExplorer ie in new ShellWindowsClass())<br />
            {<br />
                string url = ie.LocationURL;<br />
                <br />
               MessageBox.Show("Welcome to" + url, "Welcome", MessageBoxButtons.OK,<br />
               MessageBoxIcon.Information);<br />
            <br />
            <br />
            }

get info about open folder location. eg. C:/User/...
I am using Internet Explorer 8. Perhaps this is the problem?
 
Share this answer
 
It works well for me. I too used IE8.
 
Share this answer
 
how you use this code? like button? :confused:
 
Share this answer
 
Maybe someone knows any other method to get the URL when using the toolbar? :confused:

eg. When I entered the URL in Internet Explorer address bar and pressed enter I need to get message with the same URL. how to do this?
...any help?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900