So I’m writing this VB.NET application, and it’s doing things. But whenever I press a button to start some process, it does what it does except I can’t click the window until it’s finished. Otherwise the whole thing freezes. This essentially stops me from doing more than 1 thing at a time, because if I click another button (or anywhere) when something’s running, it just freezes my program. Help?
So I’m writing this VB.NET application, and it’s doing things. But whenever I press
Share
You’re going to want to look into using multiple threads for your application. By using multiple threads, you can have one thread do the processing that you need to, and another thread which is responsible for the interface. By having them be separate, you can avoid the appearance of the application freezing. When the processing is done in your other thread, you can have the other thread respond to the fact that it’s completed. Here are a few references for you:
http://msdn.microsoft.com/en-us/library/aa289496%28v=vs.71%29.aspx
http://www.codeproject.com/KB/threads/threadingvbnet.aspx
http://msdn.microsoft.com/en-us/library/eed6swsx%28v=vs.71%29.aspx