|
-
January 26th, 2009, 10:51 PM
#5
Re: Modify .TEXT property from Event Handler
 Originally Posted by Traps
// and for good measure
System.Threading.Thread[SIZE=2].Sleep(5000);
Try the thread.sleep like I showed you for 5 seconds and I bet you see them update.
No no no. Don't use the Sleep() like he showed you. Infact, don't use Sleep() at all, and certainly never ever on a UI thread. Sleeping the UI thread stops the message pump, causign the app to become "(Not Responding)" and is actually a great way of ensuring that your text boxes dont update properly.
That's some terrible advice Traps. You should read this:
http://msmvps.com/blogs/peterritchie...d-program.aspx
Then edit the nonsense out of your post..
Lastly, OP, if youre doing some long running, intensive op, don't do it on the UI thread (in a button click event handler) - use a backgroundworker! Youre only going to hang your app if you tie the UI thread up for long periods of time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|