Hello,
I´ve a problem with a small line of code.
For my Windows Application I designed a form for exporting data into xml
files.
I´m opening the dialog with:
ExportDialog export = new ExportDialog();
export.Show();
and I´m getting the following exception:
System.ObjectDisposedException was unhandled
Message="Cannot access a disposed object.\r\nObject name:
'ExportDialog'."
Source="System.Windows.Forms"
ObjectName="ExportDialog"
StackTrace:
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolea n value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at [...]
What do I do wrong?
Another form, my import dialog works fine with the same lines of code:
ImportDialog import = new ImportDialog();
import.Show();
Regards,
Martin