我想问一问当我点击MSFlexGrid固定行时发生事件,那些代码应该放在哪里呢?

解决方案 »

  1.   

    Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
     With MSFlexGrid1
        If y < .FixedRows * .RowHeight(0) Then
            MsgBox "单击了固定行"
        End If
        If x < .FixedCols * .ColWidth(0) Then
            MsgBox "单击了固定列"
        End If
    End With
    End Sub
      

  2.   

    Private Sub MSFlexGrid1_Click()
        With MSFlexGrid1
            If .MouseRow = 0 Then
                MsgBox "单击了固定行"
            End If
            If .MouseCol = 0 Then
                MsgBox "单击了固定列"
            End If
        End With
    End Sub