handyjay
asked on
.NET Run thread in background windows form
I have a .NET windows forms application. The process I have works fine, but the UI is unavailable while it is performed. It takes about 30 seconds to complete.
Once the user selects a file to process, the UI locks up since it is using the same thread.
What is the best way to perform this on a new thread and then alert the user with a messagebox it is completed?
Once the user selects a file to process, the UI locks up since it is using the same thread.
What is the best way to perform this on a new thread and then alert the user with a messagebox it is completed?
If odiag.ShowDialog() = Windows.Forms.DialogResult.OK Then
'set wait cursor
Me.Cursor = Cursors.WaitCursor
'Start the process
Dim hte As New HTMLTableToCSVExcel(odiag.FileName)
'display message to user when process completed
MessageBox.Show(String.Format("File was saved in {0}", hte.savedPath), "File Created")
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.