1、不要在字符串运行中加入像text1.text之类的控件文本也之内,如果需要就用变量代替;
2、用leftB rightB... 等代码 left right...
3、如果字符串需要连续累加,不要一直加到一个很大的长度,可以中途用一个间接变量代替;
4、如果能预知一个变量长度,用dim p as strint*100形式生明变量
。。。
是在循环中吗?如果是可以使用缓冲变量或模仿指针
如:
dim a as integer,b as string,c as string,d as integer
for a=0 to 10000
d=d+1
b=b & cstr(a) & vbcrlf
if d=50 then
c=c & b
b=""
d=0
endif
next a
if b<>"" then c=c & b
text1.text=c