473,394 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Allow textbox to go past 32K characters?

I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the status?

--
Adam Clauss
ca*****@tamu.edu
Nov 16 '05 #1
14 7548
Well, the Text property is a String. A String's Length property is an
Integer - meaning the Length can not be longer then roughly 32K (the maximum
value for an integer). So it would seem that this is a limitation of the
String class, though I am not sure whether or not this is explicitly
mentioned.

"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be limiting me? Or suggestions on an alternative method for providing the status?
--
Adam Clauss
ca*****@tamu.edu

Nov 16 '05 #2
Hmm... no, it does not mention this at all.

From MSDN doc on MaxLength:
Windows NT 4.0, Windows 2000, Windows Server 2003 family Platform Note: For single line text box controls, if the MaxLength
property is set to 0, the maximum number of characters the user can enter is 2147483646 or an amount based on available memory,
whichever is smaller. For multiline text box controls, the maximum number of characters the user can enter is 4294967295 or an
amount based on available memory, whichever is smaller.

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition Platform Note: For single line text box controls, if
the MaxLength property is set to 0, the maximum number of characters the user can enter is 32,766 or an amount based on available
memory, whichever is smaller. For multiline text box controls, the maximum number of characters the user can enter is 65,535 or an
amount based on available memory, whichever is smaller.

According to this, since I'm running Windows XP (although not mentioned, I assume it follows with Windows 2000/2003) with a
multiline text box I should get up to 4 billion characters (or memory, but I have 512MB of RAM, I'm not running out at 32K...).
--
Adam Clauss
ca*****@tamu.edu
"Marina" <so*****@nospam.com> wrote in message news:OS**************@tk2msftngp13.phx.gbl...
Well, the Text property is a String. A String's Length property is an
Integer - meaning the Length can not be longer then roughly 32K (the maximum
value for an integer). So it would seem that this is a limitation of the
String class, though I am not sure whether or not this is explicitly
mentioned.

"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #3
And wait... so an int is same as System.Int32 - a signed 32 bit integer. Its max is nowhere near 32K. Its:
-2,147,483,648 to 2,147,483,647 (as quoted per MSDN - and done by hand calculation 2^31).

So it can't be the string length limiting me.

--
Adam Clauss
ca*****@tamu.edu
"Marina" <so*****@nospam.com> wrote in message news:OS**************@tk2msftngp13.phx.gbl...
Well, the Text property is a String. A String's Length property is an
Integer - meaning the Length can not be longer then roughly 32K (the maximum
value for an integer). So it would seem that this is a limitation of the
String class, though I am not sure whether or not this is explicitly
mentioned.

"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #4
Hi Adam, can you post a small program demonstrating your problem? I was able to get a textbox to go past the 32k barrier easily.

The question I have is why are you using a text box for so much text? Does the user need to cut and paste that much text into the app?

Richard

"Adam Clauss" wrote:
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the status?

--
Adam Clauss
ca*****@tamu.edu

Nov 16 '05 #5
Hi Adam,

What OS are you using?

Cheers

Doug Forster

"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be limiting me? Or suggestions on an alternative method for providing the status?
--
Adam Clauss
ca*****@tamu.edu

Nov 16 '05 #6
When I get back to the office tomorrow I'll strip the one I have down and
try to get a small demo app.

The information is not going INTO the app, its a readonly textbox that is
used to display the status of the program (and history of the status, just
adds a new line). I chose it since the main functionality of the program
was recently brought over from a console app. The textbox AppendText method
seemed to be a natural replacement for Console.WriteLine - and it works
great, except for this.

Adam Clauss
ca*****@tamu.edu
"Richard A. Lowe" <Richard A. Lo**@discussions.microsoft.com> wrote in
message news:78**********************************@microsof t.com...
Hi Adam, can you post a small program demonstrating your problem? I was able to get a textbox to go past the 32k barrier easily.
The question I have is why are you using a text box for so much text? Does the user need to cut and paste that much text into the app?
Richard

"Adam Clauss" wrote:
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be limiting me? Or suggestions on an alternative method for providing the status?
--
Adam Clauss
ca*****@tamu.edu

Nov 16 '05 #7
Windows XP

Adam Clauss
ca*****@tamu.edu

"Doug Forster" <doug at _ZAPTHIS_
toniq_ZAPTHIS_DOT_ZAPTHIS_co_ZAPTHIS_DOTnz> wrote in message
news:uA*************@TK2MSFTNGP10.phx.gbl...
Hi Adam,

What OS are you using?

Cheers

Doug Forster

"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #8
Hi Adam

I did convert a console application few weeks ago and i found that using the
ListBox control was much more efficient than using a textBox...

if you really want to use a textbox maybe a string builder object would give
you better performance.

But as I said the listBox control is really cool...

Anyway hope this helps!

Keep us posted about what you find for a solution!

Thanks

Marc-andre Poupier, MCSE,MCT
mapoupier@NOSPAM_guardianmicro.com
"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be limiting me? Or suggestions on an alternative method for providing the status?
--
Adam Clauss
ca*****@tamu.edu

Nov 16 '05 #9
Textboxes are limited to 32K on windows 98, But under windows 200 and
higher, maxlength should go past 2GB.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Adam Clauss" <ca*****@tamu.edu> schrieb im Newsbeitrag
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status of a fairly long procedure. "Updates" are made to the status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length of the textbox. According to the documentation, setting MaxLength = 0 will increase this to basically the limit of available memory. So, in the form designer, I set the MaxLength property equal to 0.

However, this has not made any difference, as it still stops adding text at 32K characters. Any ideas why it would still be limiting me? Or suggestions on an alternative method for providing the status?
--
Adam Clauss
ca*****@tamu.edu

Nov 16 '05 #10
My apologies for not following up on this sooner. Unfortunately the schedule for this application got pushed up, so I was not able
to further test what was wrong with the textbox.

I switched over to the listbox as you suggested, and it is working great so I will stick with it.

Thank you for your advice!
--
Adam Clauss
ca*****@tamu.edu
"Marc-andre Poupier" <ma*******@smithnyc.com> wrote in message news:u0**************@TK2MSFTNGP09.phx.gbl...
Hi Adam

I did convert a console application few weeks ago and i found that using the
ListBox control was much more efficient than using a textBox...

if you really want to use a textbox maybe a string builder object would give
you better performance.

But as I said the listBox control is really cool...

Anyway hope this helps!

Keep us posted about what you find for a solution!

Thanks

Marc-andre Poupier, MCSE,MCT
mapoupier@NOSPAM_guardianmicro.com
"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #11
My apologies for not following up on this sooner. Unfortunately the schedule for this application got pushed up, so I was not able
to further test what was wrong with the textbox.

I switched over to the listbox as you suggested, and it is working great so I will stick with it.

Thank you for your advice!
--
Adam Clauss
ca*****@tamu.edu
"Marc-andre Poupier" <ma*******@smithnyc.com> wrote in message news:u0**************@TK2MSFTNGP09.phx.gbl...
Hi Adam

I did convert a console application few weeks ago and i found that using the
ListBox control was much more efficient than using a textBox...

if you really want to use a textbox maybe a string builder object would give
you better performance.

But as I said the listBox control is really cool...

Anyway hope this helps!

Keep us posted about what you find for a solution!

Thanks

Marc-andre Poupier, MCSE,MCT
mapoupier@NOSPAM_guardianmicro.com
"Adam Clauss" <ca*****@tamu.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #12
Well, since this is a multiline textbox, it would actually be 65K on Windows 98 according to the MSDN - but that is irrelevant here
as I'm on Windows XP.

--
Adam Clauss
ca*****@tamu.edu
"cody" <no****************@gmx.net> wrote in message news:uC****************@TK2MSFTNGP10.phx.gbl...
Textboxes are limited to 32K on windows 98, But under windows 200 and
higher, maxlength should go past 2GB.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Adam Clauss" <ca*****@tamu.edu> schrieb im Newsbeitrag
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #13
Well, since this is a multiline textbox, it would actually be 65K on Windows 98 according to the MSDN - but that is irrelevant here
as I'm on Windows XP.

--
Adam Clauss
ca*****@tamu.edu
"cody" <no****************@gmx.net> wrote in message news:uC****************@TK2MSFTNGP10.phx.gbl...
Textboxes are limited to 32K on windows 98, But under windows 200 and
higher, maxlength should go past 2GB.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Adam Clauss" <ca*****@tamu.edu> schrieb im Newsbeitrag
news:eM**************@TK2MSFTNGP11.phx.gbl...
I've an application which is using a multiline textbox to log the status

of a fairly long procedure. "Updates" are made to the
status by calling textbox.AppendText.

As my task is fairly lengthy, I go well past the default max text length

of the textbox. According to the documentation, setting
MaxLength = 0 will increase this to basically the limit of available

memory. So, in the form designer, I set the MaxLength property
equal to 0.

However, this has not made any difference, as it still stops adding text

at 32K characters. Any ideas why it would still be
limiting me? Or suggestions on an alternative method for providing the

status?

--
Adam Clauss
ca*****@tamu.edu


Nov 16 '05 #14
Glad to hear that it helped you!

Marc
Nov 16 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jerry | last post by:
In limiting textbox input to 500 characters I would like to include a dynamic count of characters input while the user is typing into a textbox. This would obviously be a client side control,...
2
by: mg | last post by:
The simple e-mail webform in the shown in the code below sends the characters in its textbox as an email message correctly when text of any length is pasted into the textbox but not when large...
7
by: Itar | last post by:
I'm having a problem supressing characters in a text box. I only want alpha numeric characters (no special chars). I can handle the TextBox_KeyPress event to supress the invalid characters when...
3
by: Joćo Araśjo | last post by:
Hello all, I'm a VB6 programmer, and I'm starting to change basic functions to .NET. I've seen an example on how to allow only digits on a textbox control, using the Edit Control Styles on a...
5
by: ameen.abdullah | last post by:
Hi Guys, I have a textbox in windows form that should only accept alphabets, numbers, spaces and underscore. If the textbox contains anyother character it should display a msg at the time of...
10
by: garyusenet | last post by:
I have a multiline textbox. The size of the text box should be 75 characters wide, and 5 lines in height like this: - <---75 characters--> <---75 characters--> <---75 characters--> <---75...
2
by: =?Utf-8?B?SC5CLg==?= | last post by:
Hi, In the past, I was using a MFC CEdit control to display logged data (A lot of Data). The control seems to have virtually no limit. Now, I'm using a .Net TextBox. When I reach about 32768...
5
by: nedu | last post by:
Hi All, I am trying to include only the following characters in my textbox. Will anyone please provide me some source code or idea . . Textbox must accept only 0-9, space ,hypens(-) and...
7
by: robert.waters | last post by:
I have an Access database frontend linked via ODBC to a large (gigabytes) mysql database. I need to view a large amount of data in a a textbox (variable up to 300K), but I receive a 'there isnt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.