I want to repeat an action when a Button is pressed during a long time, like for example the forward button of an MP3 reader. Is there an existing c# event in WinForm ?
I can handle the MouseDown event to start a timer which will perform the action and stop it on MouseUp event, but I am looking for an easier way to solve this problem => ie : a solution without a Timer (or Thread / Task …).
UPDATED: Shortest way:
Using
Anonymous MethodsandObject Initializer: