本文整理汇总了VB.NET中System.Windows.Forms.DataGridView.ProcessDialogKey方法的典型用法代码示例。如果您正苦于以下问题:VB.NET DataGridView.ProcessDialogKey方法的具体用法?VB.NET DataGridView.ProcessDialogKey怎么用?VB.NET DataGridView.ProcessDialogKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.DataGridView
的用法示例。
在下文中一共展示了DataGridView.ProcessDialogKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: CustomDataGridView
Public Class CustomDataGridView
Inherits DataGridView
<System.Security.Permissions.UIPermission( _
System.Security.Permissions.SecurityAction.LinkDemand, _
Window:=System.Security.Permissions.UIPermissionWindow.AllWindows)> _
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
' Handle the ENTER key as if it were a RIGHT ARROW key.
If key = Keys.Enter Then
Return Me.ProcessRightKey(keyData)
End If
Return MyBase.ProcessDialogKey(keyData)
End Function
<System.Security.Permissions.SecurityPermission( _
System.Security.Permissions.SecurityAction.LinkDemand, Flags:= _
System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)> _
Protected Overrides Function ProcessDataGridViewKey( _
ByVal e As System.Windows.Forms.KeyEventArgs) As Boolean
' Handle the ENTER key as if it were a RIGHT ARROW key.
If e.KeyCode = Keys.Enter Then
Return Me.ProcessRightKey(e.KeyData)
End If
Return MyBase.ProcessDataGridViewKey(e)
End Function
End Class