Delphi 获取memo文本光标的位置


本文整理自网络,侵删。

 
var
  Row, Col: Integer;
begin
  Row := SendMessage(Memo1.Handle, EM_LINEFROMCHAR, Memo1.SelStart, 0);
  Col := Memo1.SelStart - SendMessage(Memo1.Handle, EM_LINEINDEX, Row, 0);//delphitop.com
  Label1.caption := 'Row= ' + IntToStr(Row+1) + ' Col= ' + IntToStr(Col+1);

相关阅读 >>

Delphi xe5 android 发短信以及目录

Delphi 文件分割合并

Delphi 如何从dll中检索导出函数的列表

Delphi 字符串反转函数

Delphi xe7中stringgrid组件的使用

Delphi 中主设置静音的方式

Delphi 两种登录界面验证写法

Delphi unigui获取连接的客户端列表

Delphi listbox模糊查找文字

Delphi 7中使用加密的sqlite

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...