debugging error

  • Thread starter Thread starter Eps
  • Start date Start date
E

Eps

A first chance exception of type
'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

A first chance exception of type 'System.InvalidOperationException'
occurred in System.Windows.Forms.dll

I am getting the above errors (repeating in pairs) when debugging using
vs c#2005 beta .net framework 2. It happens just as i try and add a
item to a listViewBox (the item is just a string).

I realise you would probably need to see code to understand the problem,
but has anybody got any idea why these errors are coming up ?, is it a
thread problem ?, i do have a timer object in my program.

Any help appreciated.
 
I think you may invoke the function from a thread which is NOT the
thread to create the UI.

u probably need to check is InvokeRequired
if (InvokeRequired)
{
}
 
Back
Top