Re: Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- From: Peter Duniho <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Thu, 13 Sep 2007 11:34:31 -0700
OZI wrote:
Can you give me an explanation why when I drag my Form it goes into a Non-Responding "Mode".
When I click my Process Button, Not touch anything, just sit there and watch it, everything works fine, My progress Bar is updating and showing the Progress until the Form is moved or loses it focus.
It would be difficult to explain why you get some updating even when the processing is in the same thread as the UI, unless you can post a concise-but-complete example of code that demonstrates that behavior.
Suffice to say, however, that lengthy processing should not be in the same thread that owns your UI objects, whether it works some of the time or not.
Also can you please direct me to an example of how to create, use, and update the UI from another "Worker" Thread.
Both Chris and I have mentioned the BackgroundWorker class. You should start by looking at the MSDN documentation for that class, as well as searching this newsgroup for other threads that discuss the class. There is already a lot of information out there explaining how it's used.
If after reading that information you still have questions then of course, please post the specific questions concerned any specific issues you run into.
Pete
.
- Follow-Ups:
- References:
- Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- From: OZI
- Re: Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- From: Chris Shepherd
- Re: Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- From: OZI
- Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- Prev by Date: Re: Web reference
- Next by Date: Re: Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- Previous by thread: Re: Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- Next by thread: Re: Simple WinForm ( Not Responding ) Refesh Issue C# 2.0
- Index(es):