Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display a PROCESSING message in a label
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00897772
Message ID:
00897920
Vues:
15
This message has been marked as the solution to the initial question of the thread.
Hi Matthew

The UI doesn't refresh automatically until the end of the method. You can add a call to Refresh to have the label text update right away:
this.lblProcessing.Refresh(); 
>I am trying to do something that seems simple, but I can not get it to work? I have a winform that kicks off a data conversion routine. When I click on the Process button, I want to display several messages during the procssing so the user knows what is happening. The code looks something like this:
>
>this.lblProcessing.Text = "Starting data conversion ...";
>this.convertData();
>this.lblProcessing.Text = "Data conversion complete.";
>
>The problem is, I never see the first message while the conversion is being run? If I comment out the second 2 lines, the first message displays fine. Do I need to call a form refresh or something to have the labels text display the updated text?
>
>Thanks in advance for any suggestions.
>
>Kind Regards,
>
>Mat
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform