Difference between Rich Text Box and Standard Text Box


I'm writing a program where I'd like to have the user be able to click/double-click in a textbox, which will bring up a form.  This new form queries the textbox about what text was clicked on.  

I was using a normal textbox, and that was fine.  I used the double-click event, and then queried SelText because words are highlighted when you double-click on them.  

However, now I want to switch from a standard textbox to a richtextbox, and am running into some problems.  Rich text boxes highlight text when you double-click them, but that seems to happen after the double_click event is processed, so when I query it, its blank unless I manually selected some text.

Anyone have any other ways on how to determine what word is being clicked on?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

How about setting the global variable m_DoubleClick = True in the DoubleClick event and show the form from the MouseUp event (if the m_DoubleClick variable is True)?

ps. Just make sure to set m_DoubleClick = False when you're done. ;)
shur, you have the selstart of the text yes, and if so run a loop that adds on to this number and dose a mid on that ie
c=mid(text1.text,i,1) where i is the selstart + n which is the loop counter. then compare c tio chr(32) which is a space. When you have one stop looping and then start the loop in revirse ie -1 not plus 1 and when you get the next chr(34) you have the start of the word.
KailAuthor Commented:
That was a great idea Vbmaster.  Please submit it as the answer so I can give you the points.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.