增加文本框的限制 [英] Increasing limits of textbox

查看:71
本文介绍了增加文本框的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨组,


我有一个带有文本框控件的表单。我正在使用文本框

控件启用多行,输出我运行的

长进程的''log''信息。我的问题是它一切正常,直到

达到文本框大小的文本大小。这导致

文本框停止更新,同时运行该过程的线程

继续。


任何想法我如何扩展文本框的功能接受

更大量的数据?我尝试了一个richtextbox,但它给了我同样的问题。没错,任何不同控件的想法我都可以使用

来代替VB 2003?


我不能使用列表框因为我需要用户来能够在一行上突出显示

部分文本或部分文本,并将它们复制到

剪贴板。


TIA

Hi group,

I have a form with a textbox control on it. I am using the textbox
control with multiline enabled to output the ''log'' information for a
long process I am running. My problem is that it all works fine until
the limit of the size of text is reached for the text box. This causes
the textbox to stop update whilst the thread running the process
continues.

Any ideas how I can expand the functionality of the textbox to accept
larger amounts of data? I tried a richtextbox but it gives me the same
problem. Failing that, any ideas of a different control I could use
instead that comes with VB 2003?

I cannot use a listbox because I need the user to be able to highlight
sections of text or parts of text on one line and copy them to the
clipboard.

TIA

推荐答案

" Hugh Janus" <我的************* @ hotmail.com> schrieb:
"Hugh Janus" <my*************@hotmail.com> schrieb:
我有一个带有文本框控件的表单。我正在使用启用多行的文本框
控件来输出我正在运行的漫长过程的日志信息。我的问题是它一切正常,直到文本框达到文本大小的限制。这导致文本框停止更新,同时运行该过程的线程继续。

任何想法如何扩展文本框的功能以接受更大的数量数据的?我尝试了一个richtextbox,但它给了我同样的问题。如果不这样,我可以使用不同控件的任何想法而不是VB 2003附带的?
I have a form with a textbox control on it. I am using the textbox
control with multiline enabled to output the ''log'' information for a
long process I am running. My problem is that it all works fine until
the limit of the size of text is reached for the text box. This causes
the textbox to stop update whilst the thread running the process
continues.

Any ideas how I can expand the functionality of the textbox to accept
larger amounts of data? I tried a richtextbox but it gives me the same
problem. Failing that, any ideas of a different control I could use
instead that comes with VB 2003?




你写入控件的数据量是多少?请注意,机器

只有有限的内存。除此之外,请确保使用

''Control.InvokeRequired'',''Control.Invoke''/''Control.BeginInvoke''更新

来自另一个线程的控件而不是直接访问它,这将导致问题,因为Windows Forms控件的实例成员不是多线程安全的



-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://classicvb.org/petition/>



Which amount of data are you writing to the control? Note that the machine
only has a limited memory. In addition to that, make sure you use
''Control.InvokeRequired'', ''Control.Invoke''/''Control.BeginInvoke'' to update
the control from another thread instead of accessing it directly, which will
cause problems because instance members of Windows Forms controls are not
safe for multithreading.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


>你写入控件的数据量是多少?请注意,机器
> Which amount of data are you writing to the control? Note that the machine
仅具有有限的内存。除此之外,请确保使用
''Control.InvokeRequired'',''Control.Invoke''/''Control.BeginInvoke''从另一个线程更新控件而不是访问直接导致问题,因为Windows Forms控件的实例成员对多线程不安全。
only has a limited memory. In addition to that, make sure you use
''Control.InvokeRequired'', ''Control.Invoke''/''Control.BeginInvoke'' to update
the control from another thread instead of accessing it directly, which will
cause problems because instance members of Windows Forms controls are not
safe for multithreading.




文本不是那么多,如果它被保存为记事本中的文本文件,不应该增长到超过1或2 mb的纯文本,所以内存应该是

不是据我所知,这个问题。 2mb'远远大于文本框或Richtextbox控件可以处理的

。有什么想法吗?


p.s.我正在使用invoke来更新控件!谢谢!



It is not that much text, should not grow to more than 1 or 2 mb''s of
pure text if it was saved as a text file in notepad, so memory should
not be a problem as far as I can tell. 2mb''s is far greater than what
the Textbox or Richtextbox control can handle though. Any ideas?

p.s. I am using invoke to update the control already! thanks!


Hugh Janus写道:
Hugh Janus wrote:
你写的数据量是多少?控制?请注意,机器只有有限的内存。除此之外,请确保使用
''Control.InvokeRequired'',''Control.Invoke''/''Control.BeginInvoke''从另一个线程更新控件而不是访问它直接导致问题,因为Windows Forms控件的实例成员对多线程不安全。
Which amount of data are you writing to the control? Note that the machine
only has a limited memory. In addition to that, make sure you use
''Control.InvokeRequired'', ''Control.Invoke''/''Control.BeginInvoke'' to update
the control from another thread instead of accessing it directly, which will
cause problems because instance members of Windows Forms controls are not
safe for multithreading.



文本不是那么多,不应该增长如果将纯文本保存为记事本中的文本文件,则超过1或2 mb的纯文本,因此,就我所知,内存应该不是问题。 2mb'远远大于Textbox或Richtextbox控件可以处理的内容。有什么想法吗?

p.s.我正在使用invoke来更新控件!谢谢!


It is not that much text, should not grow to more than 1 or 2 mb''s of
pure text if it was saved as a text file in notepad, so memory should
not be a problem as far as I can tell. 2mb''s is far greater than what
the Textbox or Richtextbox control can handle though. Any ideas?

p.s. I am using invoke to update the control already! thanks!




文本框可以轻松处理...除非你正在运行Win9x。

-

Rinze van Huizen

C-Services Holland bv



The textbox can easily handle that... unless you''re running Win9x.
--
Rinze van Huizen
C-Services Holland b.v


这篇关于增加文本框的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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