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.
LoadDocument( doc, docVal);
while ( doc.readyState != "complete")
Application.DoEvents(); // I dont want to process messages now
If we use Thread.Sleep() instead of Application.DoEvents() the HTMLDocument class will not reach readyState = "complete"
Thanks in advance