Wednesday, April 29, 2009

Exit The Thread

'Exit The Thread



Private Declare Function GetCurrentThread
Lib "kernel32" () As Long



Private Declare Sub ExitThread
Lib "kernel32" _

(ByVal dwExitCode As Long)

Private Declare Function GetExitCodeThread
Lib "kernel32" _

(ByVal hThread As Long,
lpExitCode As Long) As Long



Private Sub Form_Load()

'Exit this thread

ExitThread GetExitCodeThread(GetCurrentThread, 0)

End Sub

 

No comments:

Post a Comment