How i can pause/resume a thread in window form application.
-
I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1
-
I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1
How have you set up your thread? There are numerous ways of creating a thread, so we will need to know what you have done before we can answer this.
-
I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1
Did you create a worker thread for the conversion or do you use the UI thread for that?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
I am working on a project in which audio speech is converting into text format and displaying on lable. i want to pause and resume the thread by pause and resume button. please help , if any body know about that. i used manual reset event, but i freez window form when i press pause button. plz help1
It looks like you are making you main thread sleep when you pause processing, and you end up hanging your UI. You need to have a separate thread for running your audio to text conversion code so that, you can pause that thread as an when required. (Hint: see
System.ComponentModel.BackgroundWorker
documentation) Please explain how your code works, may be then we will be able to help you better.