﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » displaying a text box</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 18 May 2026 00:38:25 GMT</lastBuildDate><ttl>20</ttl><item><title>displaying a text box</title><link>http://forum.strataframe.net/FindPost26901.aspx</link><description>I know this should be simple enough ...I am looping through a table and want to show the count as I am looping through. So I have&amp;nbsp; txtBox.text= myCount;&amp;nbsp; txtBox.refresh(); This shows the counter initially ok but if I click off the form and back on it for any reason, the number in the text box stops refreshing, even though the loop continues ok. Is there something I need to do to keep the textbox refreshing ?</description><pubDate>Thu, 22 Apr 2010 11:35:27 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: displaying a text box</title><link>http://forum.strataframe.net/FindPost26962.aspx</link><description>Hi Folks. Thnaks for your contribution.&lt;/P&gt;&lt;P&gt;I'll read up on background workers..&lt;/P&gt;&lt;P&gt;Regard, Gerard</description><pubDate>Thu, 22 Apr 2010 11:35:27 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: displaying a text box</title><link>http://forum.strataframe.net/FindPost26933.aspx</link><description>BackgroundWorkers are definately the way to go here :). Let us know if your un into any hickups!</description><pubDate>Tue, 20 Apr 2010 09:16:33 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: displaying a text box</title><link>http://forum.strataframe.net/FindPost26913.aspx</link><description>[quote][b]Gerard O Carroll (04/19/2010)[/b][hr]Is there something I need to do to keep the textbox refreshing ?[/quote]&lt;br&gt;
&lt;br&gt;
Hi Gerard,&lt;br&gt;
&lt;br&gt;
Yes, you can use a BackgroundWorker to update the textbox.  Basically the problem is that you are using the form's thread to update the textbox from the loop and if you move out of the form, that thread will not continue to refresh the textbox, you need to use a separate thread to do that.  &lt;br&gt;
&lt;br&gt;
The BackgroundWorker is pretty easy to use and there are lot of samples in Google on how to use it.</description><pubDate>Mon, 19 Apr 2010 16:21:17 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: displaying a text box</title><link>http://forum.strataframe.net/FindPost26911.aspx</link><description>Hi,&lt;br&gt;
&lt;br&gt;
Don't know if this will make any difference but try refreshing the form rather than the control.&lt;br&gt;
&lt;br&gt;
Cheers, Peter</description><pubDate>Mon, 19 Apr 2010 16:11:59 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item></channel></rss>