ObjectDisposedException - cannot access a disposed object called "Icon"

  • Thread starter Thread starter Clive Dixon
  • Start date Start date
C

Clive Dixon

I have some code using forms and ShowDialog that was previously working
perfectly well, but now throws ObjectDisposedExceptions with message
'ObjectDisposedException - cannot access a disposed object called "Icon"'
when ShowDialog is called. Anyone had this kind of error before and any
ideas as to the cause?

======================
Clive Dixon
Digita Ltd. (www.digita.com)
 
Found the problem - one of the other guys in the team has pulled the rug
from under my feet, and by using Reflector I find that Microsoft have been a
bit naughty and the Icon.Handle property get throws an
ObjectDisposedException if it has a null handle - the object has not been
disposed at all, it hasn't been initialised.

======================
Clive Dixon
Digita Ltd. (www.digita.com)
 
Back
Top