Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vb.net windows application textbox mousehover event detecting row in multirow textbox

Posted on 2008-10-15
1
Medium Priority
?
618 Views
Last Modified: 2012-05-05
I would like to determine which row the cursor is hovering over as it passes over a mulitrow textbox.
0
Comment
Question by:Howard Bash
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 22722498
You can use code ~like~ this:



Public Class Form1
 
    Private Sub TextBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseMove
        Dim index As Integer = TextBox1.GetCharIndexFromPosition(TextBox1.PointToClient(Cursor.Position))
        Dim line As String = TextBox1.GetLineFromCharIndex(index)
        Label1.Text = TextBox1.Lines(line)
    End Sub
 
End Class

Open in new window

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question