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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top