all groups > dotnet windows forms > september 2004 >
You're in the

dotnet windows forms

group:

processing of windows messages during long operation?



Re: processing of windows messages during long operation? Imran Koradia
9/24/2004 3:08:43 PM
dotnet windows forms: 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.

[quoted text, click to view]

processing of windows messages during long operation? Martin
9/24/2004 7:58:52 PM
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

Re: processing of windows messages during long operation? Martin
9/24/2004 8:09:40 PM
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

[quoted text, click to view]

Re: processing of windows messages during long operation? Piotrek
9/25/2004 11:50:09 AM
Hi

You can put your processing in a class and interact with UI with events

this is an excellent exemple ( in french :S but the code is easy to
understand)
http://blogs.microsoft.fr/pascalbe/archive/2004/09/21/227.aspx
http://www.olymars.net/Blogs/EventsDelegates/EventsDelegates.zip

it gives feedback on a file copy (time, progress...)

AddThis Social Bookmark Button