<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Thread Safety Made Easier Under Visual Studio 2005</title>
	<atom:link href="http://www.kerrywong.com/2006/05/26/thread-safety-made-easier-under-visual-studio-2005/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kerrywong.com/2006/05/26/thread-safety-made-easier-under-visual-studio-2005/</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 08:13:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: John McPhrson</title>
		<link>http://www.kerrywong.com/2006/05/26/thread-safety-made-easier-under-visual-studio-2005/comment-page-1/#comment-16069</link>
		<dc:creator>John McPhrson</dc:creator>
		<pubDate>Fri, 05 Sep 2008 18:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://dimension/2007/05/26/thread-safety-made-easier-under-visual-studio-2005/#comment-16069</guid>
		<description>Good article, works for me!

Thanks...</description>
		<content:encoded><![CDATA[<p>Good article, works for me!</p>
<p>Thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kwong</title>
		<link>http://www.kerrywong.com/2006/05/26/thread-safety-made-easier-under-visual-studio-2005/comment-page-1/#comment-72</link>
		<dc:creator>kwong</dc:creator>
		<pubDate>Mon, 22 Oct 2007 14:39:02 +0000</pubDate>
		<guid isPermaLink="false">http://dimension/2007/05/26/thread-safety-made-easier-under-visual-studio-2005/#comment-72</guid>
		<description>Hi Pankaj,

You were trying to modify a UI component (a label) from a thread other than the UI thread. To fix the problem, you can use if (Label1.InvokeRequired) in the code snippet earlier in the post to marshall the call back to the UI thread. I hope this helps.</description>
		<content:encoded><![CDATA[<p>Hi Pankaj,</p>
<p>You were trying to modify a UI component (a label) from a thread other than the UI thread. To fix the problem, you can use if (Label1.InvokeRequired) in the code snippet earlier in the post to marshall the call back to the UI thread. I hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pankaj Kohre</title>
		<link>http://www.kerrywong.com/2006/05/26/thread-safety-made-easier-under-visual-studio-2005/comment-page-1/#comment-71</link>
		<dc:creator>Pankaj Kohre</dc:creator>
		<pubDate>Mon, 22 Oct 2007 14:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://dimension/2007/05/26/thread-safety-made-easier-under-visual-studio-2005/#comment-71</guid>
		<description>Hi Kerry,
I am stuck with the same problem as you mentioned in your post and that is i am calling a function form a buttons click.

private void TimerCallBackHandler(object state) {

Label l = new Label();

l.Left = 10;

l.Top = 10;

l.Text = “Test “;

this.Controls.Add(l);

}

and i am getting the same error 

InvalidOperationexception was unhandled

Cross-thread operation not valid: Control ‘Label1’ accessed from a thread other than the tread it was created on.

Plese help me how can i solve this problem.
Thanks in advance.....[:)]</description>
		<content:encoded><![CDATA[<p>Hi Kerry,<br />
I am stuck with the same problem as you mentioned in your post and that is i am calling a function form a buttons click.</p>
<p>private void TimerCallBackHandler(object state) {</p>
<p>Label l = new Label();</p>
<p>l.Left = 10;</p>
<p>l.Top = 10;</p>
<p>l.Text = “Test “;</p>
<p>this.Controls.Add(l);</p>
<p>}</p>
<p>and i am getting the same error </p>
<p>InvalidOperationexception was unhandled</p>
<p>Cross-thread operation not valid: Control ‘Label1’ accessed from a thread other than the tread it was created on.</p>
<p>Plese help me how can i solve this problem.<br />
Thanks in advance&#8230;..[:)]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

