Forms and Threading

F

Frank Uray

Hi all

I have a question about threading with forms.

On my form I have a Progressbar and a Timer
for updating it. On the timer update I call Invoke
and this works fine. When it runs, the form is free.

When I now execute something on the form,
for this time my progreebar is stopping.

Is there any way to keep my progressbar alive ?
Or do I realy have to do any long execution on the
form in another thread ?

Thanks for any comments

Frank Uray
 
J

Jon Skeet [C# MVP]

On Oct 6, 9:57 am, Frank Uray <[email protected]>
wrote:

Is there any way to keep my progressbar alive ?
Or do I realy have to do any long execution on the
form in another thread ?

Yes, you have to do any long-running processing in another thread,
e.g. with BackgroundWorker. Otherwise the UI thread cannot respond to
UI events.

Jon
 

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

Top