BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Public Class MyDataGrid Inherits DataGrid Private Const WM_KEYDOWN As Integer = &H100 Private Const WM_KEYUP As Integer = &H101 Protected Overrides Function ProcessKeyPreview(ByRef m As System.Windows.Forms.Message) As Boolean Dim keyCode As Keys = CType(m.WParam.ToInt32(), Keys) And Keys.KeyCode If m.Msg = WM_KEYDOWN OrElse m.Msg = WM_KEYUP AndAlso keyCode = Keys.Enter Then Console.WriteLine("grid Keys.Enter") ' return false; 'ignore End If Return True End Function 'ProcessKeyPreview End Class 'MyDataGrid