I use this for a listview, but possiblke to use also in a single cell of Msflexgrid????
Code:
Private Sub ListView1_MouseMove(Button As Integer, Shift As Integer, X As Single, y As Single)
Dim HTI As LVHITTESTINFO
Dim lngRet As Long, ULTIMO As Integer
HTI.pt.X = X / Screen.TwipsPerPixelX
HTI.pt.y = y / Screen.TwipsPerPixelY
lngRet = SendMessage(Me.ListView1.hwnd, LVM_SUBITEMHITTEST, 0&, HTI)
'Me.Picture1.Move Y, X
COLONNA = HTI.lngSubItem
RIGA = HTI.lngItem + 1
'Debug.Print MESE
'Debug.Print ANNO
'TESTG = DateDiff("D", DAL, AL) + 1
ULTIMO = Day(DateSerial(ANNO, MESE + 1, 1) - 1)
Me.LCOLONNA.Caption = COLONNA
Me.LRIGA.Caption = RIGA
If COLONNA >= 1 And COLONNA <= 31 And RIGA >= 1 And ANNO > Empty And MESE > Empty Then
If Me.ListView1.ListItems(RIGA).ListSubItems(COLONNA).Text > "" Then
STANZA = Me.ListView1.ListItems(RIGA).Text
INDICE = Left(STANZA, 2)
Call APRI_PRENOTAZIONE
Me.LGIORNO.Caption = UCase(Format(DateSerial(ANNO, MESE, COLONNA), "DDD")) & "-" & DateSerial(ANNO, MESE, COLONNA)
TT.Title = Me.LGIORNO.Caption
TT.TipText = "PRENOTAZ.: " & STRINGA & " - CAMERA: " & STANZA
TT.Create Me.ListView1.hwnd
Else
m_bInLable = False
TT.Title = ""
TT.TipText = ""
TT.Destroy
Me.LGIORNO.Caption = ""
End If
End If
End Sub