Define Public Variable Correctly
Posted on 2012-03-21
I just finished integrating Motorola's SDK into my vb.net 2010 project. The SDK depends on a driver to be installed on the computer which maintains the interaction between the vb.net program and the scanner. My problem is that this program is used by people who will not be using a scanner, so now the program is throwing an error because the referenced object is not present on the computer. I assume the variable definition of the scanner classs is where it causes the problem. Is there a way to catch the error thrown by this since it's outside of a sub or function? Thanks for any help.