N
Nathan Carroll
In an mdi environment I constructed a child for with a richtextbox control
that is used to load .rtf's. This works fine on the intiatial load of the
form but when for is closed and reopened later I get:
System.ObjectDisposedException: Cannot access a disposed object named
"RichTextBox".
Object name: "RichTextBox".
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.TextBoxBase.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.RichTextBox.StreamIn(Stream data, Int32 flags)
at System.Windows.Forms.RichTextBox.LoadFile(Stream data,
RichTextBoxStreamType fileType)
at System.Windows.Forms.RichTextBox.LoadFile(String path,
RichTextBoxStreamType fileType)
at System.Windows.Forms.RichTextBox.LoadFile(String path)
at CompAid.frmSpecRules.bm_PositionChanged(Object sender, EventArgs e) in
c:\vsprojects\compaid\frmspecrules.cs:line 237
I constucted the same process previously in VB.net and it never came up with
this error. Should window form applications be built in VB.net?
that is used to load .rtf's. This works fine on the intiatial load of the
form but when for is closed and reopened later I get:
System.ObjectDisposedException: Cannot access a disposed object named
"RichTextBox".
Object name: "RichTextBox".
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.TextBoxBase.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.RichTextBox.StreamIn(Stream data, Int32 flags)
at System.Windows.Forms.RichTextBox.LoadFile(Stream data,
RichTextBoxStreamType fileType)
at System.Windows.Forms.RichTextBox.LoadFile(String path,
RichTextBoxStreamType fileType)
at System.Windows.Forms.RichTextBox.LoadFile(String path)
at CompAid.frmSpecRules.bm_PositionChanged(Object sender, EventArgs e) in
c:\vsprojects\compaid\frmspecrules.cs:line 237
I constucted the same process previously in VB.net and it never came up with
this error. Should window form applications be built in VB.net?