473,320 Members | 2,162 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,320 software developers and data experts.

Text boxes and string length

I'm looking at practical string lengths and the capacity of a text
box. I'm using a string to progressively add the status of a process
periodically and dumping that text into a text box. I don't mind
trimming the first x number of lines from the string when it reaches
certain limits, but I'd like to know at what point I may be
approaching an exception being thrown, an application crash or system
memory getting consumed.

If possible, I'd also like some suggestions as to the best way to trim
the first few lines of the string, which will be delimited by \r\n.

Thanks,
Lilith
Sep 21 '07 #1
1 1649
As of Win32, the normal edit box controls do not have hard limits (to be
precise, they have 2GB-1 limit...,
http://msdn2.microsoft.com/en-us/library/ms672096.aspx) the
practical(technical) limit comes, IMHO, from the available memory ad
required performance. The .NET does not seem to expose any further
limitations so it's only a memory/performance problem.
Preallocating memory may be a good thing.

From the user point of view, the ability to see 4 days old things might not
be interesting so another practical limit can come from there.

The use of indexOf()/lastIndexOf() and substring is the best I can think of
for now.
If you have some fixed lengths, you can play with count parameter of
indexOf..

"Lilith" <li****@dcccd.eduha scritto nel messaggio
news:2l********************************@4ax.com...
I'm looking at practical string lengths and the capacity of a text
box. I'm using a string to progressively add the status of a process
periodically and dumping that text into a text box. I don't mind
trimming the first x number of lines from the string when it reaches
certain limits, but I'd like to know at what point I may be
approaching an exception being thrown, an application crash or system
memory getting consumed.

If possible, I'd also like some suggestions as to the best way to trim
the first few lines of the string, which will be delimited by \r\n.

Thanks,
Lilith
Sep 21 '07 #2

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

Similar topics

3
by: H Brown New To It | last post by:
I am very new to Java. How would you go about making Java program that reads in a fixed length text file and pass the data into a table in an sql table? The text file data looks something like...
3
by: Mark | last post by:
Hi, Im trying to validate a form, all the validating works apart from one field. This particular field must consist of the first 2 characters as letters, & the following 5 as numbers. And if it...
2
by: Tom Fitzgibbon | last post by:
Stupid question: How do I loop through many text boxes on a page and get values for each box and put into an array? For example document.CreateEvent.test1.value will not take an array value...
4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
2
by: Paulo Rodrigues | last post by:
Hi I would like some help about the following : I have a text field and I don't want it contains any numbers. How can I limit this situation ? So far, I couldn't find literature exacly...
7
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
2
by: Sethos | last post by:
I am sure that this has been covered, hashed, and rehashed, but a search on the group did not produce the answer, so forgive me if this seems like a "newbie" type question... Besically, I have a...
0
by: gav1972 | last post by:
Working on this piece of code but when i click on my add button in the form the text boxes that i am using do not clear and so i can't add a new record any help would be great. The code for my data...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.