public function checkrow() as string
dim row as integer = me.textbox1.selectionstart
dim i as integer
dim p as integer
dim count as integer = 0
dim count1 as integer = 0
for i = 0 to me.textbox1.lines.getupperbound(0)
count += me.textbox1.lines(i).length + 2 一个回车相当于2个
if row <= count then
if i = 0 then
p = row
else
p = row – count1
end if
return “行:” & cstr(i) & “/列:” & cstr(p)
end if
count1 += me.textbox1.lines(i).length + 2
next
end function
