Trapping error Messagboxes in Dlls

  • Thread starter Thread starter fahd
  • Start date Start date
F

fahd

Hi,

Im using this particular commercially available COM dll in my C#
application. The dll implements Messageboxes to display errors. However
since i am developing a server side application, I would certainly like
to trap these messageboxes and use the exceptions thrown by the dll in
my own way.

In VB there is an OnError event that traps messageboxes is there
anything in C#?

thanks
Fahd
 
try,catch,finally doesnt stop the messagebox from appearing.

maybe i wasnt clear enough. The exception occurs inside the Dll. And
when it does, the Dll displays a messagebox. I am using this Dll and
want to stop it from displaying messageboxes. The mechanism you
mentioned does catch the exception but doest stop the messagebox from
appearing.

fahd
 
....and that is piss-poor design on the third party's part. Unless the
library is a user interface library, it should not be using, exposing,
showing, or otherwise referencing user interface components.

I would strongly recommend that you contact the third party provider
and have them remove all those message boxes.
 
Back
Top