]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` //统计选定的行数:
function GetMemoSelectLineCount:integer;
var
s,e:integer;
begin
with memo1 do begin
s:=sendmessage(handle,EM_LINEFROMCHAR,selstart,0);
e:=sendmessage(handle,EM_LINEFROMCHAR,selstart+selLength,0);
end;
result:=e-s;
end; 如果没有问题,给分吧。