469,962 Members | 2,301 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,962 developers. It's quick & easy.

Richtextbox

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?
Nov 16 '05 #1
1 2272
Nathan,

I have seen the richtextbox expert from the VBNet newsgroup strangly enough
not some days, maybe you can look yourself what he wrote about this.

http://tinyurl.com/4akjv

I hope this helps?

Cor
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by nouno | last post: by
3 posts views Thread by kangoo | last post: by
12 posts views Thread by M O J O | last post: by
9 posts views Thread by James Wong | last post: by
3 posts views Thread by michael sorens | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.