开发者

How to stimulate MouseDown event (not click) in c#?

开发者 https://www.devze.com 2022-12-16 22:21 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消