Create a vb app that runs with a timer that fires at the desired frequency. Depending on the error that pops up, you may end up having to create this as a windows service to allow it to continue running (the main error window may lock access to other windows until dealt with).
Look at the API function EnumWindows. It will get you a collection of the windows/functions currently open. When a new window is added you can detect that a new error window has been displayed to the screen.
The error should bubble to the top automatically, but you can use the BringWindowToTop api call on the new window's hwnd just to be sure.
Not an exact fit but links for reference you can build from:
api help:
http://www.freevbcode.com/ShowCode.Asp?ID=701
help in capturing the image:
http://www.codeproject.com/KB/vb-interop/DesktopScreenshotInVB6.aspx
Killing the error message - you can try to use the api to click the button or alternately you can hard kill the app generating the error. quick kill via api:
SendMessage app_hWnd, WM_CLOSE, 0, 0