Click here to Skip to main content
15,921,905 members
Home / Discussions / C#
   

C#

 
GeneralRe: How To Separate Number ? Pin
PIEBALDconsult24-Mar-08 13:13
mvePIEBALDconsult24-Mar-08 13:13 
GeneralRe: How To Separate Number ? Pin
Christian Graus24-Mar-08 13:25
protectorChristian Graus24-Mar-08 13:25 
GeneralRe: How To Separate Number ? Pin
pakpatel24-Mar-08 19:12
pakpatel24-Mar-08 19:12 
GeneralRe: How To Separate Number ? Pin
Vikram A Punathambekar25-Mar-08 2:47
Vikram A Punathambekar25-Mar-08 2:47 
GeneralRe: How To Separate Number ? Pin
PIEBALDconsult25-Mar-08 5:04
mvePIEBALDconsult25-Mar-08 5:04 
GeneralHelp Pin
Grim Re@p3r24-Mar-08 10:47
Grim Re@p3r24-Mar-08 10:47 
GeneralRe: Help Pin
Christian Graus24-Mar-08 10:59
protectorChristian Graus24-Mar-08 10:59 
GeneralStatusStrip does not update lable Pin
s196675m24-Mar-08 10:35
s196675m24-Mar-08 10:35 
Hello
I have a lengthly process which takes sometime couple of minutes. I like to update the statusbar to give some feedback to the user. When I tried to update the label of a statusstip from inside a lengthly loop, statusstrip does not show the updated result until it finishes the all iteration.

Here is my experiemental function.
 for (int i = 1; i <= 50000; i++)<br />
{<br />
     System.String str = "Iteration # "; // deliberately created inside the loop <br />
     str += i.ToString();<br />
<br />
     if ( (i % 1000) == 0)<br />
     {<br />
      toolStripStatusLabel1.Text = str; // Update statusstrip lebel every 1000 iteration.<br />
     }<br />
<br />
}<br />


When I run this function, it just display the final result which show "Iteration # 50000". It does not show any intermediate iteration.

Is it blocking the thread? Even though I put time consuming operation inside the function, still it does not show the intermediate statusstrip update.

Does any body know, how I can update the lable of a statusstrip to update the iteration number within a loop.

Thank you in advance.
GeneralRe: StatusStrip does not update lable Pin
CodingYoshi24-Mar-08 11:14
CodingYoshi24-Mar-08 11:14 
GeneralRe: StatusStrip does not update lable Pin
s196675m24-Mar-08 12:23
s196675m24-Mar-08 12:23 
GeneralRe: StatusStrip does not update lable Pin
CodingYoshi24-Mar-08 13:55
CodingYoshi24-Mar-08 13:55 
GeneralRe: StatusStrip does not update lable Pin
s196675m24-Mar-08 14:53
s196675m24-Mar-08 14:53 
GeneralRe: StatusStrip does not update lable Pin
Luc Pattyn24-Mar-08 13:09
sitebuilderLuc Pattyn24-Mar-08 13:09 
GeneralRe: StatusStrip does not update lable Pin
s196675m24-Mar-08 14:54
s196675m24-Mar-08 14:54 
Generalreturning an XML file Pin
CodingYoshi24-Mar-08 10:26
CodingYoshi24-Mar-08 10:26 
GeneralRe: returning an XML file Pin
pmarfleet24-Mar-08 10:37
pmarfleet24-Mar-08 10:37 
GeneralRe: returning an XML file Pin
CodingYoshi24-Mar-08 10:45
CodingYoshi24-Mar-08 10:45 
GeneralRe: returning an XML file Pin
pmarfleet24-Mar-08 11:17
pmarfleet24-Mar-08 11:17 
QuestionShould I Get Visual Studio 2008? Pin
BlitzPackage24-Mar-08 9:27
BlitzPackage24-Mar-08 9:27 
AnswerRe: Should I Get Visual Studio 2008? Pin
pmarfleet24-Mar-08 9:30
pmarfleet24-Mar-08 9:30 
GeneralRe: Should I Get Visual Studio 2008? Pin
BlitzPackage24-Mar-08 9:46
BlitzPackage24-Mar-08 9:46 
GeneralRe: Should I Get Visual Studio 2008? Pin
pmarfleet24-Mar-08 10:08
pmarfleet24-Mar-08 10:08 
GeneralRe: Should I Get Visual Studio 2008? Pin
PIEBALDconsult25-Mar-08 5:07
mvePIEBALDconsult25-Mar-08 5:07 
GeneralUsing active port to send TCP packets Pin
Julinnnnnn24-Mar-08 9:09
Julinnnnnn24-Mar-08 9:09 
GeneralCreating Class library (COM object) Pin
pnpfriend24-Mar-08 8:45
pnpfriend24-Mar-08 8:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.