Re: Allow textbox to go past 32K characters?

From: Adam Clauss (cabadam_at_tamu.edu)
Date: 06/22/04


Date: Tue, 22 Jun 2004 16:27:37 -0500

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
cabadam@tamu.edu
"Marina" <someone@nospam.com> wrote in message news:OSrj54JWEHA.1048@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" <cabadam@tamu.edu> wrote in message
> news:eM0IA0JWEHA.4092@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
> > cabadam@tamu.edu
> >
> >
>
>


Relevant Pages

  • Re: SetThemeAppProperties and SetWindow Theme do not effect Unicode data handling
    ... I am quite sure that is not true that controls in Windows 2000 and on always ... the Windows multibyte codepages. ... national language characters in the upper half of the 256 character ...
    (microsoft.public.win32.programmer.ui)
  • Re: which way is faster?
    ... The reason why windows seems so slow, ... paging of memoryhungry programs, ... Given that you only talk to memory, windows is not at all significantly ... and output the characters in transparent mode ...
    (alt.lang.asm)
  • Out of ... what?
    ... Windows, when it goes to state when programs cannot be opened anymore (new ... Memory should not be a problem, I have always had 500MB+ free physical ... It seems like Windows has reached the limit of GDI objects globally. ... but creates thousands of MFC list controls on one dialog. ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Virtual memory
    ... You can configure virtual memory in windows xp and thereby improve the ... How to set performance options in Windows XP ... if you have background programs such as printing or disk ... It is also known as the paging file. ...
    (microsoft.public.windowsxp.perform_maintain)
  • [NT] NNTP Service in Windows Contains Memory Leak
    ... NNTP Service in Windows Contains Memory Leak ... An affected server could be restored to normal service by ...
    (Securiteam)