This Code Work fine with ordinary button but the button in devexpress provided me some error.
It says that sender and e are not declared..
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.Enter
btnPayment_Click(sender, e)
Case Keys.F2
Case Keys.F5
Case Keys.F6
Case Keys.Escape
Me.Close()
Case Else
Return MyBase.ProcessCmdKey(msg, keyData)
End Select
Return True
End Function
In VB 2010, I have used the PerformClick. Will that work for you? ex. btnPayment.PerfformClick()