• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3146
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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