Trigger event on trackbar ValueChanged, but not in code
I want to be able to modify the value property of a trackbar in code without triggering my event handler. I wish to trigger the event only when the control is changed by the user by dragging the slider or moving it with the keyboard. What's the simplest way of achieving this? I have 6 trackbars and I want to change the value of 3 of them depending on which trackbar is changed. The issue is that changing the value of those trackbars will trigger their ValueChanged events. One way you can do this is to temporarily remove the event handlers before you modify the values in code, and then reattach