Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

With a VB TextBox txt... When the

Status
Not open for further replies.

so2679

Programmer
Joined
Jun 6, 2003
Messages
2
Location
US
With a VB TextBox txt...
When the mouse is over txt, at pt(x,y), I'd like to detect what txt.selstart would be if somebody were to click on the mouse.
txt.selstart gets set when I click on the mouse.
Do i have to imitate a mouse click to do this? (which I don't know how to -do i use SendMessage?)
But -I dont want to change focus, etc if it's not on txt - I dont want that to get focus while i'm doing this.
Are there any calculatoins that I can do do figure out what txt.selstart would be, without imitating a mouse click?

Thanks!

 
Write the selstart code on Mouse Click event.
Call Mouse_Click() in the Mouse_Move() event.
Guess it should work.

Use keywords:
Private Mouse_Move()
Call Mouse_Click()
your code here
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top