I've used threads in my apps before but wish to make sure that I'm implementing a thread correctly in this case.
Here is the function I call on a form.closed event:
LoadMemos just simply reads a few tables from the database and fills a dataset that the forms will be using. My questions are how can I tell the thread is completed and how do I perform any clean up because every time any of the child forms (up to 5 forms) are closed a new thread is created and called again. Thank you for your time and appreciate your assistance.
Here is the function I call on a form.closed event:
Code:
Private Sub RefreshData
Dim ThrData As New Thread(AddressOf LoadMemos)
ThrData.Start()
End Sub
LoadMemos just simply reads a few tables from the database and fills a dataset that the forms will be using. My questions are how can I tell the thread is completed and how do I perform any clean up because every time any of the child forms (up to 5 forms) are closed a new thread is created and called again. Thank you for your time and appreciate your assistance.