*-通过回车符截取字符串方法
**** 提取当前行
aaa = ThisForm.edit1.Value
npos = thisform.edit1.SelStart
bbb1 = LEFT(aaa,npos)
ccc1 = ALLTRIM(RIGHT(bbb1,LEN(bbb1)-RAT(CHR(13),bbb1)),CHR(13),CHR(10))
bbb2 = RIGHT(aaa,LEN(aaa)-npos)
ccc2 = IIF(ATC(CHR(13),bbb2) = 0,bbb2,ALLTRIM(LEFT(bbb2,ATC(CHR(13),bbb2)),CHR(13),CHR(10)))
cc = ccc1+ccc2
**** 计算当前行并显示
c1 = LEFT(bbb1,RAT(CHR(13),bbb1))
&&& 前面块
c2 = IIF(AT(CHR(13),bbb2) = 0,"",CHR(13)+CHR(10)+LTRIM(RIGHT(bbb2,LEN(bbb2)-AT(CHR(13),bbb2)),CHR(13),CHR(10)))
&&& 后面块
[此贴子已经被作者于2019-3-11 22:47编辑过]