Question

I have written a scanning program in visual basic using wia to scan documents and put them in a specific folder. I would like to add some custom error handling to the project that puts a message box on the screen telling the user the problem and what to do to rectify it(Like no paper in adf or scanner is switched off etc), I would like to put the error handling into a seperate module and have a try/catch block call my module and then return to the program to try again.

I have found the following web page

http://graphicsmagician.com/vbcourse/11design/errors.htm ( Example 3)

that explains how to call it but I am not sure how I would add it to my program when I publish it.

I have another project to write that will also use this module so I would like to have it seperate so I can use it in this project aswell.

Any help would be much appreciated

Thanks Gareth

Was it helpful?

Solution

I am not entirely sure about all your project circumstances, but given tha fact you tagged your question as a vb.net question, maybe the following article might be of some help to you:

It's a little bit old, but still might prove usefull: http://msdn.microsoft.com/en-us/library/ms973807.aspx

So the goal would be to create your Component as a dll Project and then Add this to the project references of any project that is supposed to utilize the functionality of said dll component. Once that is done you just need to make sure the dll ships with the Program later.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top