Skip to content

Seting the "address" field of the internet exlorer through c#

Abhinav Gupta

Asked Jun 28, 2007, 9:52 PM EDT1 answer
Share
LinkedInX
I am a novice user using Ms V Studio 2005. I would like to know how to set the address field of the internet explorer through a desktop application, on a press of the button. The url is provided by the apllication itself.
I am using only C#, no other language.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    There is one COM object available ,named InternetExplorer, in the reference window (  projects/Add referecne)

    the namespace SHDocVw will be available once you done the reference..

    using SHDocVw;

    on the click of button control use the below code..

    object missing = System.Reflection.Missing.Value;
    object filName = @"http://google.co.in";
    InternetExplorerClass IE = new InternetExplorerClass();
    IE.Navigate2(ref filName,ref missing,ref missing,ref missing,ref missing);
      
    0