Professional Documents
Culture Documents
Detecting Arrow Keys
Detecting Arrow Keys
Syntax:
C#:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
//handle your keys here
}
VB.Net:
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData
As Keys) As Boolean
'handle your keys here
End Function
This ProcessCmdKey is called during message preprocessing to handle command keys, also it is
called only when the control is hosted in a Windows Forms application or as an ActiveX control.
Return True
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function