c#怎么让button可以连续点击 200
1个回答
展开全部
private bool buttonDown;
private void btn1_MouseDown(object sender, MouseEventArgs e)
{
buttonDown = true;
int num = 0;
do
{
num++;
label1.Text = num.ToString();
Application.DoEvents();
} while (buttonDown);
}
private void btn1_MouseUp(object sender, MouseEventArgs e)
{
buttonDown = false;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询