Nhân Nguyễn Nhân Nguyễn - 1 year ago 1177
C# Question

Press key and hold event for button in Winform

I'm trying to make a button change its fore color when we press a key. Like button's name is "A" and we press A it changes the fore color into red, then we release the key it turns back to its default color. But I can't find any such event.
Thank you! :D

Answer Source

It's KeyDown, KeyPress, and KeyUp event you should use.

Refer to this link.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download