First, thank Chaosian for your solution you gave me: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21927683.html
, It's ok when i use only my RecordFeature.
I'm trying to do: Run a progressBar in a constant length of time: ex: 5000 ms
Record from Mic when a progressbar is running.
Here is my code:
Record() 'Start recording
' Start running progressBar
PreBar.value = 0
While PreBar.value < 100
PreBar.value += 1
StopRecord() ' Stop Recording from mic and progressbar is over
It works well.
Because of the thread.sleep I Can't control any buttons in my form when progressbar running. If I want to finish immediately by pushing a button ( don't want to record anymore when progressbar is running ) What should I do ???
With this request in my project, I'm trying to use timer to running progressbar but any way I still have thread.sleep.
I also use mutilthread but it has a lot of errors.
could you give me a good solution or give me some advice to do my request ???