Reputation: 315
I have an application that reads data on the main form as well as a pop-up window. On my application's main form I am reading real-time serial communication in ASCII. In my pop-up window my program is analyzing that data and capturing pass/fail scenarios.
When I execute my program it works as intended. However, while the program is running (takes ~2 minutes to finish) I can't move my pop-up window around the screen or minimize my main application window. It's as if they're stuck until the operation is complete. I am not getting a "Not Responding" message and am trying to figure out how to be able move/minimize/close windows during the operation.
Is multi-threading the answer? Any help is appreciated.
Upvotes: 0
Views: 2245
Reputation: 1907
You will need to use multithreading, or maybe some async/await operations.
http://msdn.microsoft.com/en-us/library/ms173178.aspx
http://msdn.microsoft.com/en-us/library/vstudio/hh191443(v=vs.110).aspx
Hope this helps!
Upvotes: 0
Reputation: 2857
You are probably performing some very long opração the 'main thread'. Try to create a new 'thread' to run this very large operation, and your form will not be locked.
Upvotes: 1