I have a simple form in VB.Net with some combobox filled with text from an array.
The error message i'm getting is:
Everytime the form looses focus after filling the comboboxes with this array it crashes with the above message.An unhandled exception of type 'System.ArithmeticException' occurred in system.windows.forms.dll
Additional information: Overflow or underflow in the arithmetic operation.
I am filling the comboboxes with the following code:
To duplicate the error I run that code and select something in one of more of the comboboxes then leave the form (minimise or just switch to a different program)Code:Dim cname() As String ' Get number of system components - TQNOSC(number of system components variable, noerr) Call tqnosc(nscom, noerr) ReDim cname(nscom) For i = 1 To nscom ' Get names of system components - TQGNSC(Phase index number, component name, noerr) Call tqgnsc(i, cName(i), noerr) Species1_Combo.Items.Add(cName(i)) Species2_Combo.Items.Add(cName(i)) Species3_Combo.Items.Add(cName(i)) Species4_Combo.Items.Add(cName(i)) Next i
Any ideas ?? Can't seem to use the combo box without the form crashing all the time !




Reply With Quote