processing of windows messages during long operation?

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hi,

My code has a long operation to do, and I want to let other windows messages
be processed whilst I do that operation. Casting my mind back 10 years, I
can't remember the call to do this.

Can some one tell me the answer?

Thanks
Martin
 
you could use Application.DoEvents(). But as experts in this (and other
dotnet groups) would agree, You should avoid using DoEvents and rather use
Threads. Read up on threads - it shouldn't be too much of an effort. In the
end, it'll be worth it.
The idea is to have your long operation run on a seperate thread so that the
main thread (one that the UI is running on) is free to process window
messages.

hope that helps..
Imran.
 
DoEvents is was I was looking for - I actually want to give feed back on the
long operation whilst it is going on by writing to a log window.

This is just a little utility app so I think DoEvents will be enough for me.

Thanks for the speedy reply!
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top