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.ObjectDi sposedException was unhandled
Message="Cannot access a disposed object.\r\nObje ct name:
'ExportDialog'. "
Source="System. Windows.Forms"
ObjectName="Exp ortDialog"
StackTrace:
at System.Windows. Forms.Control.C reateHandle()
at System.Windows. Forms.Form.Crea teHandle()
at System.Windows. Forms.Control.g et_Handle()
at System.Windows. Forms.Control.S etVisibleCore(B oolean value)
at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
at System.Windows. Forms.Control.S how()
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
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.ObjectDi sposedException was unhandled
Message="Cannot access a disposed object.\r\nObje ct name:
'ExportDialog'. "
Source="System. Windows.Forms"
ObjectName="Exp ortDialog"
StackTrace:
at System.Windows. Forms.Control.C reateHandle()
at System.Windows. Forms.Form.Crea teHandle()
at System.Windows. Forms.Control.g et_Handle()
at System.Windows. Forms.Control.S etVisibleCore(B oolean value)
at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
at System.Windows. Forms.Control.S how()
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
Comment