to close them, try this:

VB Code:
  1. Const BSF_POSTMESSAGE = &H10
  2. Const BSM_APPLICATIONS = &H8
  3. Private Const WM_CLOSE = &H10
  4. Private Const WM_QUIT = &H12
  5.  
  6.  
  7. Private Declare Function BroadcastSystemMessage Lib "user32" (ByVal dw As Long, pdw As Long, ByVal un As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  8. Private Sub Command1_Click()
  9.     'Broadcast a system message
  10.     BroadcastSystemMessage BSF_POSTMESSAGE, BSM_APPLICATIONS, WM_CLOSE, ByVal 0&, ByVal 0&
  11.  
  12.     BroadcastSystemMessage BSF_POSTMESSAGE, BSM_APPLICATIONS, WM_QUIT, ByVal 0&, ByVal 0&
  13. End Sub
it might not work, but it's work a try