procedure TForm1.Memo1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var ClientPoint, ScreenPoint: TPoint; begin if Memo1.SelLength > 0 then begin ClientPoint.X := X; ClientPoint.Y := Y; ScreenPoint := ClientToScreen(ClientPoint); PopupMenu1.Popup(ScreenPoint.X, ScreenPoint.Y); end; end;