Long pressed button

后端 未结 5 2205
轮回少年
轮回少年 2021-01-18 13:15

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 W

5条回答
  •  借酒劲吻你
    2021-01-18 13:48

    You can use timer between MouseDown and MouseUp.

    MouseDownEvent
    
    Timer tm1;
    
    MouseUpEvent
    
    Timer tm2;
    

    You can easily handle them between two timers.

提交回复
热议问题