Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Show Progress
Message
From
19/10/2009 22:28:39
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01429958
Message ID:
01430002
Views:
48
Try this instead of this.Refresh() ...

Application.DoEvents();


>I have a C# class that is loopig through all the rows of an Excel file. For each row I raise an event. The process in started in a WinFoms app, and in the form I trap the event. I have a progress bar on the form. I kick off the process in the Shown event so it doesn't start before the form is up.
>
>I'm calling this:
>
>
>private void _ImportProcs_RowImported(object sender, RowImportedEventArgs e)
>{
>            _ShowMessage("Imported row " + e.Row.ToString() + " of " + e.MaxRows.ToString());
>
>            progressBar1.PerformStep();   // Step us 1
>
>            this.Refresh();
>
>}
>
>
>
>Problem is, the status bar isn't refreshing. What's the right way to do this???
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform