i want to disable the default key (such as tab, etc) can anyone help?
i try this code but nothing happen:
Private myDisableAllNavKeys As Boolean = False
----------------------------------------------------------------
Public Property DisableAllNavKeys() As Boolean
Get
DisableAllNavKeys = myDisableAllNavKeys
End Get
Set(ByVal theValue As Boolean)
myDisableAllNavKeys = theValue
End Set
End Property
-------------------------------------------
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
On Error Resume Next
If myDisableAllNavKeys Then
Select Case msg.WParam.ToInt32()
Case CInt(Keys.Down)
Return True
Case CInt(Keys.Up)
Return True
Case CInt(Keys.Right)
Return True
Case CInt(Keys.Left)
Return True
Case CInt(Keys.PageDown)
Return True
Case CInt(Keys.PageUp)
Return True
Case CInt(Keys.Home)
Return True
Case CInt(Keys.End)
Return True
Case CInt(Keys.Tab)
Return True
End Select
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
thank you