473,473 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trapping error Messagboxes in Dlls

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

Nov 17 '05 #1
4 1190
yes try ... catch ... finally

something like

try{

}catch(System.exception ex){

}finally{

}

Mihir Solanki
http://www.mihirsolanki.com
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

Nov 17 '05 #2
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

Nov 17 '05 #3
yes,... if that third party dll is showing the message then you cannot stop
it using try..catch .
Mihir Solanki
http://www.mihirsolanki.com
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

Nov 17 '05 #4
....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.

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Pete | last post by:
I'm trying to improve my code so that when I open a recordset object, I can absolutely guarantee it is closed and is set = Nothing. I have read some old threads and they all say to use the...
3
by: Paul | last post by:
I have an Access 2000 database with a form that is giving me some major headaches. When you open the form, it displays all records and allows editing, but has AllowAdditions set to False so that...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
3
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command...
13
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
2
by: Captain Nemo | last post by:
I'm still using Office 2000 myself, but some of my clients have Office 2003. I've recently added a piece of code to create an instance of Word, open a document, fill in the blanks and become...
9
by: 47computers | last post by:
Pretty new to PHP, I recently started learning about error trapping. As of right now, I include the following into a page in my website: -------BEGIN PASTE-------- error_reporting(E_ERROR |...
1
by: Elmo Watson | last post by:
Up until now, I've done all the work (gui/front end programming, classes, etc) I've done all my error trapping (try/catch) in the methods in the code behind. Now I've got an opportunity to do...
1
by: jan.loucka | last post by:
I'm developing WinForms application in .NET 2.0 that talks to web service. The automatically generated proxy (reference class) has got methods for both synchronous and asynchronous invocations of...
4
by: franc sutherland | last post by:
Hello, I am using Access 2003. I am having trouble trapping the "can't append all the records in the append query" error message when appending data to a query from a table which is linked to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.