Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb6 如何确定网格中的哪个单元格鼠标指针位于上方? Private Sub-Grid1\u MouseMove(按钮为整数,移位为整数,X为单个,Y为单个) 如果????????????然后Grid1.ToolTipText= 端接头_Vb6_Grid_Tooltip_Coordinates_Mousemove - Fatal编程技术网

Vb6 如何确定网格中的哪个单元格鼠标指针位于上方? Private Sub-Grid1\u MouseMove(按钮为整数,移位为整数,X为单个,Y为单个) 如果????????????然后Grid1.ToolTipText= 端接头

Vb6 如何确定网格中的哪个单元格鼠标指针位于上方? Private Sub-Grid1\u MouseMove(按钮为整数,移位为整数,X为单个,Y为单个) 如果????????????然后Grid1.ToolTipText= 端接头,vb6,grid,tooltip,coordinates,mousemove,Vb6,Grid,Tooltip,Coordinates,Mousemove,如何使用X和Y坐标来确定鼠标指针当前在哪个单元格上 我使用的Grid的实现只有MouseMove事件,而没有MouseOver事件。私有子网格1\u MouseMove(按钮为整数,移位为整数,x为单,y为单) Private Sub Grid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If ???????????? Then Grid1.ToolTipText = <c

如何使用
X
Y
坐标来确定鼠标指针当前在哪个单元格上

我使用的
Grid
的实现只有
MouseMove
事件,而没有
MouseOver
事件。

私有子网格1\u MouseMove(按钮为整数,移位为整数,x为单,y为单)
Private Sub Grid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If  ????????????  Then Grid1.ToolTipText = <contents of cell>

End Sub
Dim intRow为整数,intCol为整数 用Grid1 对于intRow=0到.Rows-1 如果y>.RowPos(intRow),则 如果y<.RowPos(intRow)+.RowHeight(intRow),则 对于intCol=0到.Cols-1 如果x>.ColPos(intCol),则 如果x<.ColPos(intCol)+.ColWidth(intCol),则 .ToolTipText=.TextMatrix(intRow,intCol) 如果结束 如果结束 下一个intCol 如果结束 如果结束 下一篇介绍 以“Grid1”结尾 端接头
有点野蛮,但做这项工作
Private Sub Grid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  Dim intRow As Integer, intCol As Integer
  With Grid1
    For intRow = 0 To .Rows - 1
      If y > .RowPos(intRow) Then
        If y < .RowPos(intRow) + .RowHeight(intRow) Then
          For intCol = 0 To .Cols - 1
            If x > .ColPos(intCol) Then
              If x < .ColPos(intCol) + .ColWidth(intCol) Then
                .ToolTipText = .TextMatrix(intRow, intCol)
              End If
            End If
          Next intCol
        End If
      End If
    Next intRow
  End With 'Grid1
End Sub