Re: Pull the current URL address from Internet Explorer

Tech-Archive recommends: Speed Up your PC by fixing your registry



I'm getting somewhere with this.
I have learnt that I need to include Shdocvw.dll into my project. And
then use the following code...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;


namespace InternetExplorerInterface
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
foreach (InternetExplorer ie in new ShellWindows())
{
MessageBox.Show(ie.HWND);
MessageBox.Show(ie.LocationName);
MessageBox.Show(ie.LocationURL);

}

}
}
}
However when i run this my code can't find ShellWindows() - i'm guess
this is because i haven't included it's namespace in my using
directives.. But i'm having trouble finding out which namespace it
belongs to.

Also I do not really understand what a dll is (my limited understanding
before was that it was a driver file for a device) but that isn't
sufficing now as i'm getting into programming.

Can someone clarify this for me please? And also suggest why my code
isn't compiling.

TIA

.



Relevant Pages