void Component_MouseWheel(Object sender, System.Windows.Forms.MouseEventArgs e)
{
LongTimeExecutionMethod();
}
如果我滚动很长时间并停止,事件会继续触发。滚动停止时如何停止事件触发?
我试过这个,但它不起作用:
void component_MouseWheel(Object sender, System.Windows.Forms.MouseEventArgs e)
{
component.MouseWheel -= component_MouseWheel;
LongTimeExecutionMethod();
component.MouseWheel += component_MouseWheel;
}