You are not going to be able to block it in C# (well, maybe - but it would be a serious hack) If you can recompile the C++ library, there is a way to do away with that messagebox. If I remember correctly it is coming from the C libary, so do a search for the messagebox api in the C headers for the #define - then just copy/paste into your header to override, the recompile. I've done that before and it works nicely. However, on that note, the message you are getting is probably "pure virtual function call" - which indicates that the C++ code needs to be fixed anyway, as there is a bug. Search for "pure virtual function call" on MSDN and there is a full explanation of why you see that messagebox.