In C#, the Changed event for a control (say, a numericupdown) gets fired whether the value was change directly by the user or if it was changed programatically as the result of some other event.
Is there a way to determine whether the event occurred as a result of user input? For example, both manually changing the value of numericUpDown1 and clicking on button1 will display "value changed". What if I only wanted to display "value changed" if it was changed through the user clicking on the up/down arrows in the control and not as a result of clicking on button1?
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
MessageBox.Show("value changed");
}
private void button1_Click_1(object sender, EventArgs e)
{
numericUpDown1.Value = 3;
}