// Asagidaki kod TMemo icin de calisir.
// Yapmaniz gereken parametre tiplerini TMemo yapmak
function RichRow(m:TRichedit) : LongInt;
begin
Result:=SendMessage(m.Handle,EM_LINEFROMCHAR,m.SelStart,0);
end;
function RichCol(m:TRichedit) : LongInt;
begin
Result:=m.SelStart-SendMessage(m.handle,EM_LINEINDEX,SendMessage(m.Handle,EM_LINEFROMCHAR,m.SelStart,0),0);
end;
// Kullanimi:
procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Label1.Caption:= Format('%d : %d',[RichCol(form1.richedit1),RichRow(form1.richedit1)]);
end;
procedure TForm1.RichEdit1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
Label1.Caption:= Format('%d : %d',[RichCol(form1.richedit1),RichRow(form1.richedit1)]);
end;