<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0">
  <channel>
    <title>HtmlEditor</title>
    <link>http://www.itwriting.com/phorum/list.php?3</link>
    <description><![CDATA[For discussion of the .Net HTMLEditor control]]></description>
    <language>EN</language>
    <pubDate>Wed, 22 Jan 2003 08:01:13 +0000</pubDate>
    <lastBuildDate>Wed, 22 Jan 2003 08:01:13 +0000</lastBuildDate>
    <category>HtmlEditor</category>
    <generator>Phorum 5.1.25</generator>
    <ttl>60</ttl>
    <item>
      <title>Re: LoadDocument</title>
      <link>http://www.itwriting.com/phorum/read.php?3,264,265#msg-265</link>
      <author>Tim Anderson</author>
      <description><![CDATA[Yes, the best way to do this is by handling the ReadyStateChanged event.<br />
<br />
A way to do this is to have a private field in your class, say for example:<br />
<br />
bool doParse = false;<br />
<br />
Then in your button event handler you have this:<br />
<br />
doParse = false;<br />
LoadDocument(doc,docVal);<br />
doParse = true;<br />
<br />
Finally, in the ReadyStateChanged event handler:<br />
<br />
 if ((e.ReadyState = &quot;complete&quot;) &amp; doParse)<br />
 {<br />
 doParse = false;<br />
 //parse the document here<br />
 }<br />
<br />
Tim]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,264,265#msg-265</guid>
      <pubDate>Wed, 22 Jan 2003 08:01:13 +0000</pubDate>
    </item>
    <item>
      <title>LoadDocument</title>
      <link>http://www.itwriting.com/phorum/read.php?3,264,264#msg-264</link>
      <author>Kushan Ratnayake</author>
      <description><![CDATA[Suppose I want to parse a document on a button click event of a Form. And I need to lock application from user events i.e. I want to avoid calling DoEvents() method.<br />
<br />
<br />
  LoadDocument( doc, docVal);<br />
  while ( doc.readyState != &quot;complete&quot;)<br />
  {<br />
     Application.DoEvents();  // I dont want to process messages now :(<br />
  }<br />
<br />
If we use Thread.Sleep() instead of Application.DoEvents() the HTMLDocument class will not reach readyState = &quot;complete&quot;<br />
<br />
Any Ideas?<br />
Thanks in advance]]></description>
      <category>HtmlEditor</category>
      <guid isPermaLink="true">http://www.itwriting.com/phorum/read.php?3,264,264#msg-264</guid>
      <pubDate>Wed, 22 Jan 2003 07:22:28 +0000</pubDate>
    </item>
  </channel>
</rss>
