Click here to Skip to main content
15,860,861 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: i want to import a text file to datatable or something like that Pin
David Mujica1-Apr-19 5:37
David Mujica1-Apr-19 5:37 
GeneralRe: i want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 21:10
Member 142077921-Apr-19 21:10 
AnswerRe: i want to import a text file to datatable or something like that Pin
Richard MacCutchan1-Apr-19 5:55
mveRichard MacCutchan1-Apr-19 5:55 
GeneralRe: i want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 21:08
Member 142077921-Apr-19 21:08 
GeneralRe: i want to import a text file to datatable or something like that Pin
Richard MacCutchan1-Apr-19 21:20
mveRichard MacCutchan1-Apr-19 21:20 
GeneralRe: i want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 21:23
Member 142077921-Apr-19 21:23 
GeneralMessage Removed Pin
1-Apr-19 21:45
Member 142077921-Apr-19 21:45 
QuestionDataGridView Mouse Hover Event Pin
Give me a break I'm new31-Mar-19 5:54
Give me a break I'm new31-Mar-19 5:54 
I'm trying to add a custom tooltip to my datagridview(s). In my research I know that the System.Windows.Forms.DataGridViewCellMouseEventArgs has no mouse hover event so instead I am using System.EventArgs. My problem of course that the mouse hover event only fires once on the datagridview until the user moves the mouse off the control. I need the event to fire each time the user hovers over a new row. Is there a way to reset the hover event on mouse move within the same control? I have searched and cannot find anything on this.

Here is my code which works perfectly but as mentioned only fires once.

Private Sub dtgNewMrs_cellMouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) _
        Handles dtgNewMRs0.MouseHover, dtgNewMRs1.MouseHover, dtgNewMRs2.MouseHover, dtgNewMRs3.MouseHover, dtgNewMRs4.MouseHover, dtgNewMRs5.MouseHover

        Dim remMRNum As String
        Dim remMRLin As String
        Dim tTip As String = Nothing
        Dim tCount As Integer = 1

        Dim grvScreenLocation As Point = sender.PointToScreen(sender.Location)
        Dim tempX As Integer = DataGridView.MousePosition.X - grvScreenLocation.X + sender.Left
        Dim tempY As Integer = DataGridView.MousePosition.Y - grvScreenLocation.Y + sender.Top
        Dim hit As DataGridView.HitTestInfo = sender.HitTest(tempX, tempY)

        Dim chkRemarks As DataTable = rSet.Tables("RemarksMR")

        With sender
            remMRNum = .Rows(hit.RowIndex).Cells(3).Value
            remMRLin = .Rows(hit.RowIndex).Cells(4).Value

            Dim tQry = (From rems In chkRemarks.AsEnumerable()
                        Where rems.Field(Of String)("MR_Num") = remMRNum And
                           rems.Field(Of String)("MR_Line") = remMRLin).ToList()

            Dim r = From t In tQry
                    Select t

            If r.Count > 0 Then
                For Each row As DataRow In r
                    tTip = tTip & Str(tCount) & ".  " & row.Item(3) & Chr(13)
                    tCount += 1
                Next
            End If
        End With

        remTip.SetToolTip(sender, tTip)

AnswerRe: DataGridView Mouse Hover Event Pin
mo149231-Mar-19 7:45
mo149231-Mar-19 7:45 
QuestionJust wondering it this code is safe. Thanks for input. MESSAGE CLOSED Pin
mo149227-Mar-19 2:22
mo149227-Mar-19 2:22 
SuggestionRe: Just wondering it this code is safe. Pin
Richard Deeming27-Mar-19 2:44
mveRichard Deeming27-Mar-19 2:44 
AnswerRe: Just wondering it this code is safe. Pin
Dave Kreskowiak27-Mar-19 3:02
mveDave Kreskowiak27-Mar-19 3:02 
AnswerRe: Just wondering it this code is safe. Sorry To All Pin
mo149227-Mar-19 3:33
mo149227-Mar-19 3:33 
GeneralRe: Just wondering it this code is safe. Sorry To All Pin
Dave Kreskowiak27-Mar-19 5:28
mveDave Kreskowiak27-Mar-19 5:28 
GeneralRe: Just wondering it this code is safe. Sorry To All Pin
mo149227-Mar-19 5:47
mo149227-Mar-19 5:47 
QuestionA faster way to find an item in a bindingsource and return its index Pin
desanti26-Mar-19 14:45
desanti26-Mar-19 14:45 
AnswerRe: A faster way to find an item in a bindingsource and return its index Pin
Eddy Vluggen27-Mar-19 3:36
professionalEddy Vluggen27-Mar-19 3:36 
GeneralRe: A faster way to find an item in a bindingsource and return its index Pin
desanti27-Mar-19 4:25
desanti27-Mar-19 4:25 
GeneralRe: A faster way to find an item in a bindingsource and return its index Pin
Eddy Vluggen27-Mar-19 4:39
professionalEddy Vluggen27-Mar-19 4:39 
QuestionHow to change path from local to server Pin
RedPandinus25-Mar-19 5:10
RedPandinus25-Mar-19 5:10 
AnswerRe: How to change path from local to server Pin
Mycroft Holmes25-Mar-19 19:18
professionalMycroft Holmes25-Mar-19 19:18 
QuestionSearching with special characters Pin
RedPandinus21-Mar-19 2:23
RedPandinus21-Mar-19 2:23 
AnswerRe: Searching with special characters Pin
Richard Deeming21-Mar-19 3:24
mveRichard Deeming21-Mar-19 3:24 
GeneralRe: Searching with special characters Pin
Mycroft Holmes21-Mar-19 11:41
professionalMycroft Holmes21-Mar-19 11:41 
GeneralRe: Searching with special characters Pin
Richard Deeming22-Mar-19 1:37
mveRichard Deeming22-Mar-19 1:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.