|
-
Jun 25th, 2004, 11:14 PM
#1
Thread Starter
Fanatic Member
current cursor location
how do i know what is the current location of the cursor inside a richtextbox? something like [if i type] brown monkey is not me and the cursor is in m, i have 7. thanks...
Last edited by brown monkey; Jun 26th, 2004 at 01:24 AM.
-
Jun 26th, 2004, 12:20 AM
#2
Sleep mode
One way , use MousePosition methods .
VB Code:
MousePosition.X
MousePosition.Y
-
Jun 26th, 2004, 12:38 AM
#3
Thread Starter
Fanatic Member
sorry for not clearing the things that i want. by the way pirate mate, thanks for the reply. i mean the blinking cursor inside richtextbox. something like if i have the brown monkey is not me text in the richtextbox and [say] if i have the cursor in the m of monkey, i can get the value 7. sort of 7th character. thanks
-
Jun 26th, 2004, 12:55 AM
#4
Sleep mode
I see . Let me try to do you a demo!
-
Jun 26th, 2004, 12:58 AM
#5
Thread Starter
Fanatic Member
i think this is it
VB Code:
dim i as integer=richtextbox1.selectionstart
.
.
.
richtextbox1.selectionstart=i
is this the way mate? i don't know much about this. lol...
-
Jun 26th, 2004, 01:03 AM
#6
Sleep mode
Yeah . You just put that code in the MouseDown or MouseUp events . It's up to you .
-
Jun 26th, 2004, 01:05 AM
#7
Thread Starter
Fanatic Member
thanks so much pirate mate.
-
Jun 26th, 2004, 01:07 AM
#8
Sleep mode
You solved your own problem .
-
Jun 26th, 2004, 01:23 AM
#9
Thread Starter
Fanatic Member
i've got another prob [related]. how do i get the current string where the cursor is located. say, brown monkey is not me text and the cursor is in m of monkey. i want to get the string monkey...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|