这个功能有时候不执行?
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If keyData = Keys.Enter Then
SendKeys.Send("{UP}") //这里有时候不能执行
enf if
End Function
有时候就向上动一下,有时候回车太快的时候就不行了
[解决办法]
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
If keyData = Keys.Enter Then
SendKeys.Send("{UP}") '//这里有时候不能执行
Application.DoEvents() '执行完后转移一下控制权
End If
End Function