在VB中的MSFlexgrid控件上按回车键后,它不能响应回车事件请问为什么

解决方案 »

  1.   

    设置窗体的keypreview为true
      

  2.   

    可以亚,你要做什么?Private Sub MSFlexGrid1_KeyDown(KeyCode As Integer, Shift As Integer)
    Debug.Print KeyCode
    End Sub  
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://feiyun0112.cnblogs.com/
      

  3.   

    应该能响应KeyDown和KeyPress事件
      

  4.   

    Private Sub Form_Load()
        Me.KeyPreview = True
    End SubPrivate Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
        If KeyAscii = vbKeyReturn Then
            MsgBox "按下回车"
        End If
    End Sub天狼工作室
    http://www.j2soft.cn/
      

  5.   

    Private Sub MSFlexGrid1_KeyUp(KeyCode As Integer, Shift As Integer)
    MsgBox KeyCode
    End Sub好MShflexgrid控件要更加好用