Open Form New Thread And Then Stopping Thread (Close Form)
Posted on 2012-08-13
So here's the deal. I have a form that does rather a lengthy process. While this is running I want to open another form that has an animated gif that runs to show that the application is 'thinking'. If I just open the form while the other process is running the animated gif becomes just a black box. However, if I do this:
Private Sub openUpdate()
And call that using this:
Dim t As Thread
t = New Thread(AddressOf Me.openUpdate)
Everything works as I want it to. But, how do I then close that thread? I have looked at a few things here on EE and using google, but I can't really find a solution. Many things about threadname.abort, but I can't get that to work. There is a function that runs on my main form that when it finishes I want to close this thread. So I will be stopping the thread from the main form.
Any ideas? I hope this makes sense. Also, if there is a better way of doing this I am all ears (or eyes in this case).
Thanks for any ideas.