By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,117 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

Richtextbox upper limit

P: n/a
I've seen no reference to this in the MSDN library, so I ask here... what
is the known upper limit for the RichTextbox control? And when this
limit is exceeded, what error is generated?
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I think it's limited to the avaliable system memory.

--
Regards
Dillon Mantle
Jul 17 '05 #2

P: n/a

"CajunCoiler (http://www.cajuncoiler.tk)"
<po**********@totallyspamless.cox.net> wrote in message
news:mFzOb.2362$ZJ1.524@lakeread01...
I've seen no reference to this in the MSDN library, so I ask here... what
is the known upper limit for the RichTextbox control? And when this
limit is exceeded, what error is generated?


I have a MS Language Reference (hard copy) from years ago and remember
reading a table in there that shows field limitation. I now it broke the 64K
textbox limitation. I will find the hardcopy but I believe it was 4096Mb
(which might be its internal pointer limit). I let you know if I find the
hard copy.
Jul 17 '05 #3

P: n/a
I don't know whether it has an ultimate limit, but
the default limit is 64K characters, with an image
counting as 1 character.
(Some MS docs say it's 65K characters and some say
it's 65535 bytes. I'm guessing that they don't count
the RichText formatting info.)

You can set it in the RTB properties: MaxLength.
Maxlength = 0 is for no limit, which is backwards
of how the RTB actually works so it's hard to know
what VB is doing when you set MaxLength = 0.

If you have a RichEdit with no limit set the default
is 64K. If you call EM_EXLIMITTEXT or EM_SETLIMITTEXT
with a parameter of 0 the limit will be set to 64K. So VB
must be calling EM_EXLIMITTEXT using a specific high
number. Maybe you could catch it using Spy++.

--
--
CajunCoiler (http://www.cajuncoiler.tk)
<po**********@totallyspamless.cox.net> wrote in message
news:mFzOb.2362$ZJ1.524@lakeread01...
I've seen no reference to this in the MSDN library, so I ask here... what
is the known upper limit for the RichTextbox control? And when this
limit is exceeded, what error is generated?

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.