MSHTML C# navigate a web page

  • 13 years ago

    Can anyone help me how to navigate a web page  programatically

    I need to programatically click on a hyperlink  within the page.

    I use next code , but that don't work.

    public static bool FireEvent(mshtml.IHTMLElement elt, string eventName)

    {

    mshtml.IHTMLDocument4 docEv = elt.document as mshtml.IHTMLDocument4;

    object dummy = null;

    object oEvt = docEv.CreateEventObject(ref dummy);

    mshtml.IHTMLEventObj2 evt = (mshtml.IHTMLEventObj2)oEvt;

    evt.button = 1;

    return docEv.FireEvent(eventName,ref oEvt);

    }

     

     



     

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is anticipated with distaste, performed with reluctance, and bragged about forever.” - Dan Kaminsky