So there I was, trying out a multithreading example and stepping through the process. It was much like a lot of the same code I'd written to practice the methodology. Unfortunately, it wedged when I attempted to update a control from my new thread that was created in the main UI thread. I would expect this to be a problem, of course, but wasn't sure how to handle it (I think previous versions of .Net would have allowed me to update the control cross-thread). I look at the error and this is how it appears:
Normally, I don't pay attention to the troubleshooting tips because most of the time it takes me to a page that basically says "You goofed, dude; don't do that" rather than explain anything. My next step is usually to consult Google.
However, there was a link that looked pretty promising, and it is! It is one of the most practical MSDN articles I've read. It illustrates a bad call (like the one I had), and had two other versions of how to make the call the right way and even explained why it works. How cool is that?
So, now I've a very good grip on it and have added a very handy bit of coding to my arsenal. It's a good day. :-)
Oh, and this is my 300th post on ol' GWB. Hard to believe I ever had that much to say.
And it's my b-day, too. :-)
posted @ Friday, August 15, 2008 10:40 AM