Updating the status
-
Hi all, I am creating a text mining engine and after a button click i create inverted index and it takes quite a while to do so. Now i want some user interface to tell that something is in progress. i am using a static label lblStatus. and updating its value during different places in the function. but it doesnt work.. lblStatus.Text = "10% Completed"; and so on. but it is not working the label doesnot change it remain the same as it was in the start and when the index is completely created it shows 100% completed.... tell me how it will work.. or advise me wat other method should i use. Regards,
-
Hi all, I am creating a text mining engine and after a button click i create inverted index and it takes quite a while to do so. Now i want some user interface to tell that something is in progress. i am using a static label lblStatus. and updating its value during different places in the function. but it doesnt work.. lblStatus.Text = "10% Completed"; and so on. but it is not working the label doesnot change it remain the same as it was in the start and when the index is completely created it shows 100% completed.... tell me how it will work.. or advise me wat other method should i use. Regards,
-
Sir plzz explain a little coz i m relative new commer in C# Regards,
-
Sir plzz explain a little coz i m relative new commer in C# Regards,
If you call DoEvents in your code, your application can handle the other events. Say, you are are updating the label text by 10% within a function. You wont be able to see updated label text messages until the function has completed its execution. If you use Application.DoEvents() just after the update ui code, the function will continue its execution and you UI will be updated
label1.Text="20% completed";
Application.Doevents();Have a look into this link http://msdn2.microsoft.com/en-US/library/system.windows.forms.application.doevents.aspx
-
If you call DoEvents in your code, your application can handle the other events. Say, you are are updating the label text by 10% within a function. You wont be able to see updated label text messages until the function has completed its execution. If you use Application.DoEvents() just after the update ui code, the function will continue its execution and you UI will be updated
label1.Text="20% completed";
Application.Doevents();Have a look into this link http://msdn2.microsoft.com/en-US/library/system.windows.forms.application.doevents.aspx
thxx Sir, it is working exactly as i wanted it to :) Regards, -- modified at 11:21 Tuesday 9th May, 2006