Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-15
1
596 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 85

Accepted Solution

by:
Mike Tomlinson earned 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
get row value in vb.net 4 17
vb.net 1 month apart 11 35
get combo value in class 5 14
VB.net -  GroupBox / Panel DataBinding and behavior 3 12
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

791 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