How to get cursor position in a richtextbox

appub4u

New member
Joined
Mar 20, 2007
Messages
2
Programming Experience
3-5
i hav a richtextbox control in my form
while pressing ctrl + spacebar i need to show a list box at the cursor position
like (visual studio editor)
how do i get the current cursor position of richtextbox
please help me
 
i got the answer

Dim p As Point = RichTextBox1.GetPositionFromCharIndexRichTextBox1.SelectionStart)

CaretTop = RichTextBox1.Top + p.Y + RichTextBox1.Font.Height + 5
CaretLeft = RichTextBox1.Left + p.X
 
Back
Top