本文整理匯總了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