i think this could work, since it's not necessary to catch the msgbox instantly, i can do a check every 10 minutes what am trying to do, is to check whether an application among the ones running generated an error msgbox, if so, kill it's process and run it again... can the enumwindow get the name of the application that caused a msgbox to appear? i know i can do this in another way but then it would need modification to all the apps ( ) to put a record in a database that it had an error...so trying to do a system hook would be better anyways am still reading and checking examples to get to the bottom of this