<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How To Update Controls Using BackgroundWorker in VB.NET</title>
	<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/</link>
	<description>Articles on VB.NET and Software Development Team Leadership</description>
	<pubDate>Sat, 22 Nov 2008 07:54:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: ALegaspi</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1243</link>
		<author>ALegaspi</author>
		<pubDate>Fri, 14 Nov 2008 16:59:41 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1243</guid>
		<description>THank you for this article... this gives me idea how to use the BW.

But I have a question. I have a situation that I think but Im not sure backgroundworker will help solve this problem. I have a form that contains all th details of our product and wthin this form I have a button that when you click it will popup another form let say sub form for the user to select a product. within this sub form I have to button "select" and "Add" button. When I click select it will add my selections let say on a collection to hold the data. and Add button will works to add another selection. What I want is to update the main form that contains the details of what I select from sub form. Right now on how it works, the details or data will only be displayed on the main form after clicking the ok button. What I want is updating the mainform to show my selections everytime i click select or add button. Do you think backgroundworker will help me on this? fi not do you have any suggestions of what is better to do on this? thanks it will really helps me a lot when I solve this problem.</description>
		<content:encoded><![CDATA[<p>THank you for this article&#8230; this gives me idea how to use the BW.</p>
<p>But I have a question. I have a situation that I think but Im not sure backgroundworker will help solve this problem. I have a form that contains all th details of our product and wthin this form I have a button that when you click it will popup another form let say sub form for the user to select a product. within this sub form I have to button &#8220;select&#8221; and &#8220;Add&#8221; button. When I click select it will add my selections let say on a collection to hold the data. and Add button will works to add another selection. What I want is to update the main form that contains the details of what I select from sub form. Right now on how it works, the details or data will only be displayed on the main form after clicking the ok button. What I want is updating the mainform to show my selections everytime i click select or add button. Do you think backgroundworker will help me on this? fi not do you have any suggestions of what is better to do on this? thanks it will really helps me a lot when I solve this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sivakumarm</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1235</link>
		<author>sivakumarm</author>
		<pubDate>Thu, 06 Nov 2008 12:43:44 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1235</guid>
		<description>i had look on backgroudworker, i is very nice
but i have one doubt, i am using threads to get asynchronous call to worker procedure...but it is working fine, for normal query "insert" but same scripts i am just running in stored procedure that time, after getting right result, my application not responding to select any option in UI. 

can you make any comments reg. the same

sivam</description>
		<content:encoded><![CDATA[<p>i had look on backgroudworker, i is very nice<br />
but i have one doubt, i am using threads to get asynchronous call to worker procedure&#8230;but it is working fine, for normal query &#8220;insert&#8221; but same scripts i am just running in stored procedure that time, after getting right result, my application not responding to select any option in UI. </p>
<p>can you make any comments reg. the same</p>
<p>sivam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1227</link>
		<author>James</author>
		<pubDate>Sat, 18 Oct 2008 05:36:05 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1227</guid>
		<description>I almost gave up on the progress bar. I would have a long time ago but my programs were too unstable. Thanks to your examples I have everything working great.</description>
		<content:encoded><![CDATA[<p>I almost gave up on the progress bar. I would have a long time ago but my programs were too unstable. Thanks to your examples I have everything working great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: djib</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1226</link>
		<author>djib</author>
		<pubDate>Thu, 16 Oct 2008 15:36:33 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1226</guid>
		<description>Mmmh, sorry for the trouble... I just found a solution using a Delegate !

Public Class LogWindow
    Implements ILogWindow
    Public Delegate Sub DelegateLog(ByVal text As String)

    Public Sub log(ByVal text As String) Implements ILogWindow.log
        If Me.InvokeRequired Then
            Me.Invoke(New DelegateLog(AddressOf Me.log), New Object() {text})
        Else
            Me.LogBox.Text += text
        End If
    End Sub
End Class</description>
		<content:encoded><![CDATA[<p>Mmmh, sorry for the trouble&#8230; I just found a solution using a Delegate !</p>
<p>Public Class LogWindow<br />
    Implements ILogWindow<br />
    Public Delegate Sub DelegateLog(ByVal text As String)</p>
<p>    Public Sub log(ByVal text As String) Implements ILogWindow.log<br />
        If Me.InvokeRequired Then<br />
            Me.Invoke(New DelegateLog(AddressOf Me.log), New Object() {text})<br />
        Else<br />
            Me.LogBox.Text += text<br />
        End If<br />
    End Sub<br />
End Class</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: djib</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1225</link>
		<author>djib</author>
		<pubDate>Thu, 16 Oct 2008 14:39:54 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1225</guid>
		<description>Hello,
Thanks for that post.
I'm still having quit a bit of trouble with threading though. Here is my problem :

I have an application running a TCPListener in a Thread. I created a Logger singleton that can display text in a TextBox.
The thing is that both my TCPListener and my main thread need to access the Logger.
The problem is that when I access the Logger via the TCPListener, it won't allow me to update the control on the form. I can't figure out how to get it to work.

Thanks for your help.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Thanks for that post.<br />
I&#8217;m still having quit a bit of trouble with threading though. Here is my problem :</p>
<p>I have an application running a TCPListener in a Thread. I created a Logger singleton that can display text in a TextBox.<br />
The thing is that both my TCPListener and my main thread need to access the Logger.<br />
The problem is that when I access the Logger via the TCPListener, it won&#8217;t allow me to update the control on the form. I can&#8217;t figure out how to get it to work.</p>
<p>Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FSReyes</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1207</link>
		<author>FSReyes</author>
		<pubDate>Thu, 11 Sep 2008 21:06:18 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1207</guid>
		<description>Just to say thanks. You make it so simple than other examples out there. 

Now I got my progress bar working with a call on my stored procedure. I got the progress bar to work like KITT in Knight Rider until when it encounters the RunWorkerCompleted.</description>
		<content:encoded><![CDATA[<p>Just to say thanks. You make it so simple than other examples out there. </p>
<p>Now I got my progress bar working with a call on my stored procedure. I got the progress bar to work like KITT in Knight Rider until when it encounters the RunWorkerCompleted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LloydM</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1185</link>
		<author>LloydM</author>
		<pubDate>Fri, 08 Aug 2008 19:59:11 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1185</guid>
		<description>Thanks 

This article pushed me over the top of the hill
I integrated the concept with the way i was already using events for a progress bar in wpf and .net 3.5.  Now the progress bar is real time.   

Thanks Again
LM AKA DkUltra</description>
		<content:encoded><![CDATA[<p>Thanks </p>
<p>This article pushed me over the top of the hill<br />
I integrated the concept with the way i was already using events for a progress bar in wpf and .net 3.5.  Now the progress bar is real time.   </p>
<p>Thanks Again<br />
LM AKA DkUltra</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DavidM</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1126</link>
		<author>DavidM</author>
		<pubDate>Tue, 03 Jun 2008 21:30:26 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1126</guid>
		<description>Can this BW be used on webapps to create a progressbar for uploading files. Where the BW returns ProgressPercentage and gives it back to an Ajax request?

Tell me if i'm completely off track.

Thanks</description>
		<content:encoded><![CDATA[<p>Can this BW be used on webapps to create a progressbar for uploading files. Where the BW returns ProgressPercentage and gives it back to an Ajax request?</p>
<p>Tell me if i&#8217;m completely off track.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1116</link>
		<author>Ricky</author>
		<pubDate>Wed, 21 May 2008 15:59:15 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1116</guid>
		<description>Firstly, thankyou jfrankcarr. Helped me out. I can now update many controls, previously I only passed information through the userstate.

Andrew, can you paste your code so we can look?</description>
		<content:encoded><![CDATA[<p>Firstly, thankyou jfrankcarr. Helped me out. I can now update many controls, previously I only passed information through the userstate.</p>
<p>Andrew, can you paste your code so we can look?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1111</link>
		<author>Andrew</author>
		<pubDate>Wed, 14 May 2008 22:00:12 +0000</pubDate>
		<guid>http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/#comment-1111</guid>
		<description>I'm having a terrible time with the backgroundworker control.

Here's the scenario:

I have a form with a DataGridView on it which I want to be updated by a Backgroundworker.

I have a separate module that has an event-driven handler that calls RunWorkerAsync.

If I declare the BackGroundWorker (and the DoWork and RunWorkerCompleted Subs) in the Form, the RunWorkerCompleted event never fires.

If I declare the BackGroundWorker (and DoWork and RunWorkerCompleted Subs) in the separate module where the RunWorkerAsync command is called, the RunWorkerCompleted event does fire, but inside that sub is the code to update the DataGridView, and I get an error saying that I cannot update the DataGridView from a thread other than the one the DataGridView is on.

I don't want to have all the code that's in my module stuck in the Form's code as the classes in the module get used elsewhere as well.

I've tried everything I can think of, searched the internet for days and I simply cannot figure out how to get this to work.

I even gave up on using BackgroundWorker but within the separate module I cannot update the DataGridView. It seems it can only be updated from within the form's code that the DataGridView is on.

Augh! Help? Please?

If I declare the BackGroundWorker</description>
		<content:encoded><![CDATA[<p>I&#8217;m having a terrible time with the backgroundworker control.</p>
<p>Here&#8217;s the scenario:</p>
<p>I have a form with a DataGridView on it which I want to be updated by a Backgroundworker.</p>
<p>I have a separate module that has an event-driven handler that calls RunWorkerAsync.</p>
<p>If I declare the BackGroundWorker (and the DoWork and RunWorkerCompleted Subs) in the Form, the RunWorkerCompleted event never fires.</p>
<p>If I declare the BackGroundWorker (and DoWork and RunWorkerCompleted Subs) in the separate module where the RunWorkerAsync command is called, the RunWorkerCompleted event does fire, but inside that sub is the code to update the DataGridView, and I get an error saying that I cannot update the DataGridView from a thread other than the one the DataGridView is on.</p>
<p>I don&#8217;t want to have all the code that&#8217;s in my module stuck in the Form&#8217;s code as the classes in the module get used elsewhere as well.</p>
<p>I&#8217;ve tried everything I can think of, searched the internet for days and I simply cannot figure out how to get this to work.</p>
<p>I even gave up on using BackgroundWorker but within the separate module I cannot update the DataGridView. It seems it can only be updated from within the form&#8217;s code that the DataGridView is on.</p>
<p>Augh! Help? Please?</p>
<p>If I declare the BackGroundWorker</p>
]]></content:encoded>
	</item>
</channel>
</rss>
