Nhân Nguyễn Nhân Nguyễn - 6 months ago 42
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


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

Refer to this link.