943,599 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 354
  • C# RSS
May 13th, 2009
0

Thread

Expand Post »
Hi,

I've wrote a small application which browse a folder and rename the files within that foldrer. However if the folder more then 500 files then the app tends to take a while to process.

I somehow or the other needs to show some sort of text displaying "processing..." or show an animated image so that the user can see somethign happening. Otherwise one just feels the application has got stuck and is not responding

Can anyone help me with that. I've tried to put a label and updates its text the the proces starts but it doesn't work out, even tried invalidating the label control.

I've tried doing the same but still nothing happens. The text is displayed when the application completes the full task.

Thx
a
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
gallian99 is offline Offline
77 posts
since Jan 2009
May 13th, 2009
0

Re: Thread

Place an Applicaiton.DoEvents(); inside of the loop so that the main thread has a chance to service its message queue and this should allow your label to update.

// Jerry
Reputation Points: 69
Solved Threads: 75
Posting Pro in Training
JerryShaw is offline Offline
465 posts
since Nov 2006
May 13th, 2009
0

Re: Thread

Thanks got that worked out. I had to make safe thread calls.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
gallian99 is offline Offline
77 posts
since Jan 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Error on search button
Next Thread in C# Forum Timeline: C# Command Prompt Reading





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC