That stack trace is telling you that, in the Load event handler of Form1, you are calling LogFile.gGetInfo and, in that method, you're calling String.Substring and passing a negative number for the 'length' parameter. Obviously you can't get a substring with a negative length. I suggest that you place a breakpoint on that method call in the Load event handler and then you can step to the Substring call and see where that negative length is coming from.