VB Code:
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_CLOSE = &H10
Private Sub Timer1_Timer()
Dim lngHWND As Long
Dim strCaption As String
strCaption = "The caption of the MsgBox that the app pops up..." 'Change this )
lngHWND = FindWindow(vbNullString, strCaption)
If lngHWND <> 0 Then
PostMessage lngHWND, WM_CLOSE, 0&, 0&
End If
End Sub
This code will destroy a window as long as your know it's title...