Get the handle of the window that should be desroyed usinf FindWindow and then do
VB Code:
  1. Declare Function DestroyWindow Lib "user32" Alias "DestroyWindow" (ByVal hwnd As Long) As Long
  2.  
  3. DestroyWindow hwndofthewindow

or use SendMessage first send the WM_CLOSE then the WM_DESTROY messages.