MDI Icon dispose error?

  • Thread starter Thread starter Smokey Grindle
  • Start date Start date
S

Smokey Grindle

I keep getting this message

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'Icon'.

at System.Drawing.Icon.get_Handle()

at System.Drawing.Icon.get_Size()

at System.Drawing.Icon.ToBitmap()

at System.Windows.Forms.MdiControlStrip.GetTargetWindowIcon()

at System.Windows.Forms.MdiControlStrip..ctor(IWin32Window target)

at System.Windows.Forms.Form.UpdateMdiControlStrip(Boolean maximized)

at System.Windows.Forms.Form.WmSize(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)



why? it seems to be coming internally. and it seems like its the icon for
the form that is open in the mdi window but i cant figure out why that would
get disposed randomly
 
Back
Top