That would just close the window, I want to unload the entire program itself.

I found this code on AllAPI.net

VB Code:
  1. Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
  2. Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
  3. Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
  4.  
  5. Private Sub Form_Load()
  6.     'KPD-Team 1999
  7.     'URL: [url]http://www.allapi.net/[/url]
  8.     'E-Mail: [email][email protected][/email]
  9.     'end this process
  10.     ExitProcess GetExitCodeProcess(GetCurrentProcess, 0)
  11. End Sub

What process would that kill though?

Thank you,
Sir Loin