Mega Code Archive

 
Categories / Delphi / Hardware
 

Follow the mouse in TMemo to set the cursor position

Title: follow the mouse in TMemo to set the cursor position? procedure TForm1.Memo1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Memo1.SelStart := LoWord(SendMessage(Memo1.Handle, EM_CHARFROMPOS, 0, MakeLParam(X, Y))); Memo1.SelLength := 0; end;