Created a Windows application consisting of two forms. On the first form, the second is launched. There is one nuance. Before launching the second form, files are copied, which will then be used in the second form. The fact is that during this action, the first form completely freezes. So I decided to use multithreading. To work with files, I created a new background thread. I need to determine the time of its completion in order to run the second form, because if I include the launch of the second form in the same stream as the work with files, it will throw an exception:
"Creating an instance of an ActiveX control" 8856f961-340a-11d0-a96b-00c04fd705a2 "is impossible: the current stream is not in a single-threaded container."
What do you advise me?