Salient Solutions

wrasslin ones and nones for fun and profit - Sky Sanders' Blog
Get your own ranked flair here
posts - 92, comments - 108, trackbacks - 0

Application.DoEvents() - not just for Forms

You can use Application.DoEvents() in a headless library, just add a reference to System.Windows.Forms.

What prompted me to try this is a headless browser implementation I found here.

Of course the first thing I felt compelled to do is replace the Application.DoEvents() by spawning a thread to run the loop poll. That did not work as planned and the mshtml class just stalled.

Not feeling like reinventing the wheel, I added the reference to Forms, put the DoEvents back inline and bingo!

Reflecting DoEvents, it appears that a message pump is being run. Not something I have any desire to touch. DoEvents() it is.

Print | posted on Saturday, December 19, 2009 10:29 PM |

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 4 and 8 and type the answer here:

Powered by: