//No.1 通过像素计算
procedure TForm1.Button1Click(Sender: TObject);
begin
Canvas.Font.Assign(Memo1.Font);
Caption := IntToStr(Memo1.ClientHeight div Canvas.TextHeight('|'));
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Canvas.Font.Assign(Memo1.Font);
Caption := IntToStr(Memo1.ClientHeight div Canvas.TextHeight('|'));
end;
另外TXETHEIGHT好象还不是每行的高(未包含,每行之间的空白点)