I want to get the current URL from the IE (.NET 4) . To do so, I added a reference to Microsoft Interner Controls and added the code (from http://omegacoder.com/?p=63)
foreach (InternetExplorer ie in new ShellWindowsClass())
{
textBox1.Text = ie.LocationURL.ToString();
}
but I get 2 errors:
1] The type 'SHDocVw.ShellWindowsClass' has no constructors defined
2] Interop type 'SHDocVw.ShellWindowsClass' cannot be embedded.
Use the applicable interface instead.
How to solve that ?