I 开发者_StackOverflowhave designed a GUI calc ,I have used flat buttons for the numbers, to get the button click feel I have changed the mouse down color, but when I use the numpad keys to do calc I am able to stimulate the click event. How do I stimulate MouseDown event?
Take the code that changes the button color from the mousedown event, refactor it into it's own method and call it from the keydown event as well.
精彩评论