function Tfirstmbfrm.convertstring(source:string):string; var i,j:integer; a,b:array[0..50] of char; begin StrPCopy(a, source) ; j:=0; i:=0; while (a[j]<>#0) do begin b[i]:=a[j]; if (j mod 2=1)and(j>0) then begin Inc(i); b[i]:=#13; inc(i); b[i]:=#10 end; Inc(j); Inc(i); end; b[i-1]:=#0; result:= strpas(b); end;参考这个
var
i,j:integer;
a,b:array[0..50] of char;
begin
StrPCopy(a, source) ;
j:=0; i:=0;
while (a[j]<>#0) do
begin
b[i]:=a[j];
if (j mod 2=1)and(j>0) then
begin
Inc(i);
b[i]:=#13;
inc(i);
b[i]:=#10
end;
Inc(j);
Inc(i);
end;
b[i-1]:=#0;
result:= strpas(b);
end;参考这个
如:label1.caption:=字符串#13+字符串#13+.....
可以分成很多行,试试看,一定行!
然后用空格分隔想换行的地方
2.找到其中的Label的Caption,在其中插入#13
例如原来是Caption='label',那你可改为Caption='lab'+#13+'el';
3.右键后选择view as Form即可