469,636 Members | 1,555 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,636 developers. It's quick & easy.

Cursor position in RichEdit

Hi!

I'm new to VB.NET

Anybody that could show me how to find the cursor position in a
RichEdit?

That is: when user click anywhere in the box and there's some text
already, I want to programatically move to a new line and insert time,
make a new line and user will be ready to insert new text.

I would appreciate if someone could show me how to count the amount of
words and place the caret/cursor at the actual point.

Happy programming!

Nov 21 '05 #1
2 2629
gs***@hotmail.com wrote:
Hi!

I'm new to VB.NET

Anybody that could show me how to find the cursor position in a
RichEdit?

That is: when user click anywhere in the box and there's some text
already, I want to programatically move to a new line and insert time,
make a new line and user will be ready to insert new text.

I would appreciate if someone could show me how to count the amount of
words and place the caret/cursor at the actual point.

Happy programming!


I don't know what a richedit is, but if you mean richtextbox then:

You need to look at RichTextBox.SelectionStart,
RichTextBox.SelectionLength, RichTextBox.SelectedText. These methods
return where the cursor is put, how long it is and what text is there.

Good Luck,
Chris
Nov 21 '05 #2
Yeah, that's right!

I discovered some answers in the group seconds after posting. I say:
why not read FAQ or search the group BEFORE I post a question?

(Who knows....)

Anyway thanks a lot.

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by murlbrown | last post: by
1 post views Thread by Dan H. | last post: by
1 post views Thread by Tantra Veda | last post: by
1 post views Thread by Ilann | last post: by
1 post views Thread by objectref | last post: by
1 post views Thread by Patty O'Dors | last post: by
1 post views Thread by Paul | last post: by
4 posts views Thread by Stanley | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.