G
Guest
OK, here's a mystery for you guys. It's a bug, I'm sure, but my question is:
is there a workaround?
Set up a Double-click event handler for a ListBox. In that event handler,
either close the form (this.Close()) or call another method that closes it,
doesn't matter.
You get an error:
An unhandled exception of type 'System.ObjectDisposedException' occurred in
system.windows.forms.dll
Additional information: Cannot access a disposed object named "ListBox".
This only seems to happen for ListBoxes. I tried it with a ListView and a
DataGrid and everything worked fine.
Any workarounds?
TIA,
~~Bonnie
is there a workaround?
Set up a Double-click event handler for a ListBox. In that event handler,
either close the form (this.Close()) or call another method that closes it,
doesn't matter.
You get an error:
An unhandled exception of type 'System.ObjectDisposedException' occurred in
system.windows.forms.dll
Additional information: Cannot access a disposed object named "ListBox".
This only seems to happen for ListBoxes. I tried it with a ListView and a
DataGrid and everything worked fine.
Any workarounds?
TIA,
~~Bonnie