here is what i currently have in my derived datagrid that detects when tab is pressed and selects the next control.
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If msg.WParam.ToInt32() = CInt(Keys.Tab) Then
'goto next tab control
Me.Parent.SelectNextControl(Me, True, True, True, True)
Return True
End If
End Function
this works fine but i now need to be able to detect if the shift key is being held down at the same time as tab so that i can have it go to the previous control, but I dont know what is required to determine if shift is pressed. Thanks for any help
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If msg.WParam.ToInt32() = CInt(Keys.Tab) Then
If 'shift key is pressed' then
'goto previous tab control
Me.Parent.SelectNextControl(Me, False, True, True, True)
Else
'goto next tab control
Me.Parent.SelectNextControl(Me, True, True, True, True)
End If
Return True
End If
End Function
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If msg.WParam.ToInt32() = CInt(Keys.Tab) Then
'goto next tab control
Me.Parent.SelectNextControl(Me, True, True, True, True)
Return True
End If
End Function
this works fine but i now need to be able to detect if the shift key is being held down at the same time as tab so that i can have it go to the previous control, but I dont know what is required to determine if shift is pressed. Thanks for any help
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If msg.WParam.ToInt32() = CInt(Keys.Tab) Then
If 'shift key is pressed' then
'goto previous tab control
Me.Parent.SelectNextControl(Me, False, True, True, True)
Else
'goto next tab control
Me.Parent.SelectNextControl(Me, True, True, True, True)
End If
Return True
End If
End Function