C
Colin Graham
I am using the following code on my form to capture whether the tab
control has been pressed.
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean
Select Case keyData
Case Keys.Tab
MsgBox("tab pressed")
Return True
End Select
End Function
this code works fine to capture the tab press on the form but i wish
it only to occur on a specific control. what i really wish to do is to
find out if the tab has been pressed when i have got focus on a
specific control e.g. textbox1.text
Can anyone tell me how i can do this e.g. how do i call the function??
or is it a case that i must create a custom control??
Many thanks
CG
control has been pressed.
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As
System.Windows.Forms.Keys) As Boolean
Select Case keyData
Case Keys.Tab
MsgBox("tab pressed")
Return True
End Select
End Function
this code works fine to capture the tab press on the form but i wish
it only to occur on a specific control. what i really wish to do is to
find out if the tab has been pressed when i have got focus on a
specific control e.g. textbox1.text
Can anyone tell me how i can do this e.g. how do i call the function??
or is it a case that i must create a custom control??
Many thanks
CG