• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3244
  • Last Modified:

VB6 - Max Lines in VB6 TextBox

Hi,
Is there a maximum limit for lines in a normal vb6 textbox?
0
feesu
Asked:
feesu
  • 3
  • 3
  • 3
1 Solution
 
Jai STech ArchCommented:
if you have the MULTI LINE property then there is no actual limit
but your application will become slower as more data gets added to your control
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the limit is not the number of lines, but the number of characters, which is 64K, AFAIK.
0
 
feesuAuthor Commented:
I've got an application that receives tcpip feed. I display them in a text box. It actually gets slow and freezes after a day or work, cuz i don't turn it off. It has to keep running. The amount of data is very huge. Do i empty the content every certain number of lines or every certain text.length? Or what do you recommend?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
Jai STech ArchCommented:
instead of a textbox...wnhy not use a rich text box or someother control which has the capability to hold more data...

if you are not really thinking of displaying the data...you can also save it in a file...which is much faster
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Do i empty the content every certain number of lines or every certain text.length? Or what do you recommend?
yes, you can do that.
as the "number of lines" is not that easy with a textbox, I do reduce based on the size in such applications...
0
 
feesuAuthor Commented:
I don't need to save the data. Just to show it to user. I am already saving it in my code to a database. The text box is there to show the user what's happening.

What is my check going to be like? What is the length that i should reset the text box when i reach to?
0
 
Jai STech ArchCommented:
if Len(textbox.text) > 1000 then textbox.text =""
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
assuming you add "on top":

if len(textbox.text) > 60000 then
  text.text = left(textbox.text, 1000)
end if



0
 
feesuAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now