>Public Class dssgridview > Inherits DataGridView > Sub New() > Me.AutoGenerateColumns = False > > End Sub > Protected Overrides Function ProcessDialogKey( _ > ByVal keyData As Keys) As Boolean > ' Extract the key code from the key value. > 'Dim key As Keys = keyData And Keys.KeyCode > 'MsgBox("OK") > > ' Handle the ENTER key as if it were a RIGHT ARROW key. > If keyData = Keys.Enter Then > > Me.ProcessRightKey(keyData) > 'SendKeys.Send("{tab}") > Return False > > End If > Return MyBase.ProcessDialogKey(keyData) > End Function >>End Class