Show Counter Runtime
-
Hi all, I have write a program for showing added records, couter. but it does not working/showing during the for loop execution. after stoped loop it will show. but i want to show it as continue (1,2,3 ... 50000).
for (intCounter = 1; intCounter;= 50000; intCounter++) { lblShowCount.Text = intCounter.ToString(); oEmployee.AddRecord(); }
Please guide me what would be the better approch for showing continue Counter during the loop executionPavan Pareta
-
Hi all, I have write a program for showing added records, couter. but it does not working/showing during the for loop execution. after stoped loop it will show. but i want to show it as continue (1,2,3 ... 50000).
for (intCounter = 1; intCounter;= 50000; intCounter++) { lblShowCount.Text = intCounter.ToString(); oEmployee.AddRecord(); }
Please guide me what would be the better approch for showing continue Counter during the loop executionPavan Pareta
this will do....
for (intCounter = 1; intCounter;= 50000; intCounter++) { lblShowCount.Text = intCounter.ToString(); **Application.DoEvents();** oEmployee.AddRecord(); }
KSS
-
Hi all, I have write a program for showing added records, couter. but it does not working/showing during the for loop execution. after stoped loop it will show. but i want to show it as continue (1,2,3 ... 50000).
for (intCounter = 1; intCounter;= 50000; intCounter++) { lblShowCount.Text = intCounter.ToString(); oEmployee.AddRecord(); }
Please guide me what would be the better approch for showing continue Counter during the loop executionPavan Pareta
Calling Application.DoEvents is the easy way to fix this. Putting the AddRecord call in another thread, and having the end of the thread call fire a new one, is the better way.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi all, I have write a program for showing added records, couter. but it does not working/showing during the for loop execution. after stoped loop it will show. but i want to show it as continue (1,2,3 ... 50000).
for (intCounter = 1; intCounter;= 50000; intCounter++) { lblShowCount.Text = intCounter.ToString(); oEmployee.AddRecord(); }
Please guide me what would be the better approch for showing continue Counter during the loop executionPavan Pareta
Thanks It is very useful. :)
Pavan Pareta
-
Calling Application.DoEvents is the easy way to fix this. Putting the AddRecord call in another thread, and having the end of the thread call fire a new one, is the better way.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )