VS 2008. Trying to use Enter Key as Tab Key to move to next control. This works well except ctl is always returning tsc1, my tool strip container as the active control no matter which control I'm on. So the multiline section never gets executed.
Auguy
Sylvania/Toledo Ohio
Code:
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
Dim dotab = False
Dim ctl = Me.ActiveControl
If ctl IsNot Nothing And keyData = Keys.Enter Then
dotab = True
If TypeOf ctl Is TextBoxBase Then
If DirectCast(ctl, TextBoxBase).Multiline Then dotab = False
End If
End If
If dotab Then
If Me.SelectNextControl(ctl, True, True, True, True) Then Return True
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
Auguy
Sylvania/Toledo Ohio