var currentLine:integer;
begin
CurrentLine:=Editor.Perform(EM_LINEFROMCHAR,$FFFF,0);
Application.messagebox(pchar('当前行号是:'+inttostr(CurrentLine+1)),'消息',mb_information);
end;
{注意:第一行的行号为零}
另外用CaretPos也可实现。
行=Editor.CARETPOS.Y+1;
列=Editor.CARETPOS.X+1]);