什么意思?
是保持第一行不为空吗?
var
i: integer;
j: integer;
memo2: tmemo;
begin
for i:=0 to memo1.Lines.Count-1 do
begin
if trim(memo1.Lines)<>'' then
begin
j:=i;
break;
end;
end;
if (j>0) and (j<memo1.Lines.Count-1) then
begin
memo2:=tmemo.Create(self);
memo2.Parent:=form1;
memo2.Text:='';
for i:=j to memo1.Lines.Count-1 do
begin
memo2.Lines.Add(memo1.Lines);
end;
memo1.Lines.Clear;
memo1.Lines:=memo2.Lines;
memo2.Free;
end;
end;