When I run my program I will get an error every now and then, it is error code 5. According to http://support.microsoft.com/kb/146864 error code 5 is : Invalid procedure call. I also get these exceptions in the output window:



A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll

does anyone know what this is and how to fix it? I have tried try/catch block (not very good at it but i tried) and on error goto, but that didn't work to well except for finding the error code number.