焦点由Gridview 转到其他控件

 Private Sub FocusButton()
        TextEdit1.Focus()
    End Sub
    Private Sub GridView3_KeyDown(ByVal sender As ObjectByVal e As System.Windows.Forms.KeyEventArgs) Handles GridView3.KeyDown
        Dim vw As GridView = CType(sender, GridView)
        If e.KeyCode = Keys.Enter  Then
            BeginInvoke(New MethodInvoker(AddressOf FocusButton))
        End If
    End Sub

posted on 2011-09-27 13:37  笑看风云淡  阅读(226)  评论(0编辑  收藏  举报

导航