posts - 124,  comments - 29,  trackbacks - 0

     using System.Runtime.InteropServices;

{
       [DllImport("user32")]
        public static extern bool GetCaretPos(ref   System.Drawing.Point lpPoint);

        private void  GetCurRowNo()
        {
            try
            {
                Point P = new Point(0);
                GetCaretPos(ref   P);
                int Pos = txtCmdInput.GetCharIndexFromPosition(P);
                m_iCurRowNo = txtCmdInput.GetLineFromCharIndex(Pos);

            }
            catch
            {
                m_iCurRowNo = -1;
            }
        }
}

posted on 2008-12-02 11:16 天书 阅读(789) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理



<2008年12月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

常用链接

留言簿(5)

随笔档案

文章分类

文章档案

好友的Bolg

搜索

  •  

最新评论

阅读排行榜

评论排行榜