VB6 将长字符串复制到文本框 [英] VB6 copy long string to text box

查看:48
本文介绍了VB6 将长字符串复制到文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这个问题在堆栈溢出时不能很好地形成,请道歉.但是,我试图以编程方式将一个非常长的字符串分配给文本框,但只有一部分字符串进入.其余部分被切断.

Hi Apologize if this question doesn't form well with stack overflow. However, I am trying to assign a VERY long string to a text box programmatically but only part of my string is coming in. The rest is cut off.

  Text1.Text = UPCSTRING 

UPCSTRING 大约有 319,000 个字符,每 70 个字符后有一个换行符.为什么整个字符串没有显示在文本框中?有没有更好的方法来做到这一点?

UPCSTRING is about 319,000 chars and has line breaks after each 70 chars. Why doesn't the whole string show up in the textbox? IS there a better way to do this?

PS 如果我 debug.print UPCSTRING 我的整个字符串显示.

PS if I debug.print UPCSTRING my whole string shows up.

推荐答案

根据 关于 VB6 文本框的 MSDN 文章,它可以容纳的文本数量有限制:

Per the MSDN Article on the VB6 Textbox, there are limitations to the amount of text it will hold:

默认情况下,您最多可以在文本框中输入 2048 个字符.如果你将控件的MultiLine属性设置为True,最多可以输入32K 文本.

By default, you can enter up to 2048 characters in a text box. If you set the MultiLine property of the control to True, you can enter up to 32K of text.

正如其他人评论的那样,任何大的东西对用户来说都是无稽之谈.

As others have commented, anything that large is just nonsense to the user.

如果你坚持这个界面,也许切换到富文本框 会有所帮助,因为它没有标准文本框所具有的文本限制.

If you insist on this interface, perhaps switching to the Rich Text Box will help as it doesn't have the text limitation that the standard Text Box does.

这篇关于VB6 将长字符串复制到文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆