Why cannot terminate the application ?

  • Thread starter Thread starter Cylix
  • Start date Start date
C

Cylix

How to terminnate the application which contain another thread runing a
looping of tcplisten?
When I just execute the application.exit, the thread doesn't stop.
How can I terminate the appication in this case?

Thanks.
 
Private Sub ExitApp()
Thread.Abort()
' Application.Sleep(500) ' You may need this too to give the thread time
to finish
Application.Exit()
End Sub
 
Back
Top