createdocumentfromurl problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tunga Torgal

    createdocumentfromurl problem

    I am trying to use MSHTML without the webbrowser and I am having a few
    problems. Right now all I am trying to do is load an URL(html page) and
    access its innerhtml.


    What I have is:


    HTMLDocument hd = new HTMLDocument();
    IHTMLDocument2 ihd;
    ((IHTMLDocument 2)hd).write("<h tml></html>");
    ((IHTMLDocument 2)hd).close();
    ihd = ((IHTMLDocument 4)hd).createDoc umentFromUrl("h ttp://www.aksam.com.t r",
    "");

    It seems like I am able to load the url correct (ran a packet sniffer),
    however, I cannot figure out how to detect that it has completed. I looked
    in
    the web and there were some old examples using:

    while(ihd.ready State != "complete")
    {
    Console.WriteLi ne(ihd.readySta te);
    Thread.Sleep(10 );
    }

    But when I tried it never ended.
    Any suggestions/ideas?




Working...