以下は、ProcessCmdKey の私のコードです。
Public Class EmployeeStatus
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
Handl(msg, keyData, bNavi)
End Function
Public Function Handl(ByRef msg As Message, ByVal keyData As Keys, ByRef bNavi As BindingNavigator) As Boolean
Try
If keyData = (Keys.Control or Keys.S) Then
TBSave
Return True
end if
Catch ex As Exception
Return False
End Try
End Function
Public Function TBSave() as Boolean
Try
'Some code for saving to database
Catch ex As Exception
msgbox(ex.message)
End Try
End Function
End Class
テキストボックスに焦点を合わせている場合を除いて、すべて正常に機能します。オブジェクトに文字「S」を残します。この問題を解決するにはどうすればよいですか?