Hello!
I'm working on a WIndows Application project ( VB .Net in VS 2005) and I'm having an un solved problem with updating a progressBar on a Win Form from different Thread...
More exactly, In the Main Win Form of my project I launch a Thread which opens another Win Form. In this new window I select a series of parameters and then I press the OK button which calls different functions that read data from multiple TXT files located on a server. This new window also contains a ProgressBar that is supposed to show to progression of each txt file read....
Now, the functions I call for reading the data are situated in the Main Win Form code (from where I launch the new Thread...)...
So, to resume, from the main project class I launch a thread which creates a new win form containing a progressbar and which calls functions located in the main class...
The problem is that I want to modify the progressbar directly from the functions I use to read the txt files (while reading them) but it doesn't work...:((
I tried puting delegates in the new win form code and then call them from within the functions but It doesn't work ...
Can you please give me some ideas for my problem?
I read a few articles about the BackgroundWorker of VS 2005...Do you thinkusing backgroundworker could solve my problem?
A second issue I have is related to the debugging of the process mentioned before...In fact, while debugging, if I put a breakpoint and I stop the code for a few seconds, my thread ends unexpectedly and my new win form closes completely, without warnings...Do you know what causes these ?
Thank you in advance for your help
Best Regards
Start Free Trial