作者APee0509 (阿皮)
看板C_Sharp
标题Re: [问题]用C#写笔记本的问题
时间Mon Jun 11 21:42:12 2007
※ 引述《cole945 (躂躂..)》之铭言:
: ※ 引述《cole945 (躂躂..)》之铭言:
: : 目前.NET没提供. 要不自己写, 要不WinAPI有方法可以做..
: 歹势我刚发现.NET2.0(vs2005)後就有提供了 囧
: int line = textBox1.GetLineFromCharIndex(textBox1.SelectionStart);
: int col = textBox1.GetFirstCharIndexOfCurrentLine();
: Text = line + "," + (textBox1.SelectionStart - col);
: ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: 这样就可以了..
不好意思~~~我是用richtextbox的
用这个语法 好像有错误
有其他方法吗??
谢谢
--
http://www.wretch.cc/blog/APee0509
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.217.141.175
1F:→ cole945:错误讯息呢? 06/12 01:56
2F:→ APee0509:他说richtextbox没有定义 06/12 20:11
3F:→ APee0509:GefGirstCharIndexOfCurrentLine 06/12 20:12
4F:→ APee0509:抱歉是richtextbox不包含Get~~~~~的定义 06/12 20:12