Click to See Complete Forum and Search --> : Cursor Pos into TextBox
Tonatiuh
Jun 5th, 2000, 09:11 PM
How can I know the position of the cursor into the TextBox?
Fox
Jun 5th, 2000, 09:39 PM
The MouseMove event of the TextBox returns the cursor coordinates relativr to it. If you want to get the absolute position you can use the GetCursorPos API function or add the position of the TextBox and every parent to the coordinates.
'Module
Public Type tCoord2D
x As Long
y As Long
End Type
Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As tCoord2D) As Long
'Code
Dim Temp as tCoord2D
'Get position
GetCursorPos Temp
Caption = Temp.x & ", " & Temp.y
crazymarc
Jun 6th, 2000, 04:22 AM
Yeah I Need To Know This So I Can Insert Text Where The Cursor Is At Please Email Me When Yall Figure It Out. <B>crazymarc@hotmail.com<B>
crazymarc
Jun 7th, 2000, 07:36 AM
I Found Out...
You Could Use The SelStart Property, Or You Could Also see The SelTexr Property
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.