Placing a floating list box over a text box [Resolved]
I'm trying to write a word completion program. For that, I have to place a floating listbox over a text box. The list box should move as the user types in text box.
I can't figure out how to get the current text (where the cursor is) x,y co-ordinates from a textbox.
I know that in VB6 it would have been solved by SendMessage API but I've no idea how to do it in VB.NET.
I tried to call the same API in .NET as well, but unsuccessful
Any help?
thanx
Last edited by sbasak; Jun 1st, 2003 at 07:56 AM.
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
Thanx, but I tried with SendMessge, problem is it's neither giving error nor doing the thing I want - ie. it can't return the co-ordinate where my cursor is in my text box
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
Me.Cursor.Position.X() gives position where the mouse pointer is! But I want the position my text cursor blinks in the textbox [perhaps some people say it as caret position].
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
Originally posted by sbasak Me.Cursor.Position.X() gives position where the mouse pointer is! But I want the position my text cursor blinks in the textbox [perhaps some people say it as caret position].
Thought you are trying to retrieve the text where the cursor is over . Anyways , glad you got to work .