I'm having a little headache right now. I have a vn .net 2008 program (.net 4) that does a lot of job in the background. When the user click on a button, the whole form disabled and another form is poped with a progress bar and status information. Then, in the main form, subs and function are ran which send update information to the progress form. Thing is, after a while, the UI thread freeze and the program enter "not responding mode". I've read about doing threads, I tried doing thread but what I want is the main form to stay disabled while the thread is running and the progressform to still be updated.
When using threads, I can't change another thread, it's a protection. So I checked on the web and there is a command to check if the code is ran from the right thread and then change thread if it's not the case and do the job. I've tried these but I get errors.
Then again, for the form to stay disabled, I ran a loop that check if the thread is ended. But then again, it lock up the program.
PS I just contacted patch for a free trail,
But I'm sure that I'm gonna pay for another 5 years of win10
My acer laptop is now almost 6 years old, it's an old school laptop; I can open it with my iFixit toolset, I clean it every 6 months, I can replace a lot parts without any problems it will run another 5 years no matter what.
If I need I have the money to buy a frame.work laptop with heavy specs.
That will do for a many of years
Question
Nodiaque
Hello everyone,
I'm having a little headache right now. I have a vn .net 2008 program (.net 4) that does a lot of job in the background. When the user click on a button, the whole form disabled and another form is poped with a progress bar and status information. Then, in the main form, subs and function are ran which send update information to the progress form. Thing is, after a while, the UI thread freeze and the program enter "not responding mode". I've read about doing threads, I tried doing thread but what I want is the main form to stay disabled while the thread is running and the progressform to still be updated.
When using threads, I can't change another thread, it's a protection. So I checked on the web and there is a command to check if the code is ran from the right thread and then change thread if it's not the case and do the job. I've tried these but I get errors.
Then again, for the form to stay disabled, I ran a loop that check if the thread is ended. But then again, it lock up the program.
Thanks
Link to comment
https://www.neowin.net/forum/topic/1052075-vb-net-2008-application-not-responding-mode/Share on other sites
4 answers to this question
Recommended Posts