Hi,
I'm gettting a problem while terminating a thread .
my problem is while aborting the thread using threadobject.abort it is giving a message " the thread is being aborted".
can any one suggest how to avoid this message .I'm adding the part of the code using threads
-regards
GRK
Dim tr As New Thread(AddressOf funbusygif) Private Sub funbusygif() Tryobjshowbusy.ShowDialog()
objshowbusy.Dispose()
Catch ex As ExceptionMessageBox.Show(ex.Message)
End Try End Sub-----------------------------------------
tr.start()
'Some other code is running
tr.abort

problem while aborting the thread
dchester11
Jangid
The problem why you saw the "abort" error message, is that you catch the ThreadAbortException and bring up a dialog with a try-catch block. You should change your try-catch block to prevent catching this exception.
You usually don't want to call thread.abort to stop a thread. The thread will end once the function (funbusygif in your case) ends. The thread could check whether it should end itself.