When you click the Start Count the sample will start counting the vowels and displays that in the bottom count meters (i.e.) in the text boxes for A, E, I, O, U.
In the meantime a progress bar will show the progress of the operation.
Hi All, I have a Windows Form app that does some work in a Background Worker.
But, when there is an interaction, counting process stops and after interaction completed the counting resumes.
Use heavy interaction like moving the form or resizing the form.
If you use a Progress Bar or some other control to report the tasks progress.
You should avoid unnecessary calls to Report Progress method because this causes a thread switch which is a relatively expensive in terms of processing time.
Drawing on a Form does not always happen when you want it. So its possible that the refresh in your case will not have the desired effect.
The Refresh() method of a control comes in handy here. if i have enough time, i will post the code with 2 threads later hope it helps Daniel Hi, Daniel I appreciate your feedback very much!
option will overcome the drawback of do only one stuff at once (i.e.) now with the background worker component you can see the progress update and vowels count meter increasing continuously even when you resize the form.
The Check Vowel A function checks the passed in value to make sure it is a vowel A.
The arguments will be converted to array of string and passed away.