title: Can I change a form control value but not trigger an event?
body: <p>This one may be hard to ask but I will do my best.  Lots of stuff on SO and elsewhere on making an event trigger on change but I want the opposite (at least I think I do!).</p>
  
  <p>I have several controls on a form (<code>numericUpDowns</code>).  For each updown, I'm watching to see if a value has been changed and it will trigger a "ValueChanged" method. </p>
  
  <pre><code>private void numericUpDown1_ValueChanged(object sender, EventArgs e)
  {
      //do some complicated code ...
  } 
  </code></pre>
  
  <p>It's all working well with the changes to up-down controls causing recalculation of the fomr BUT what if I want to set a few of the values in a method and NOT call my <code>ValueChanged</code> melthods until the end?</p>
  
  <p>I'd almost like something like this</p>
  
  <pre><code>// start ignoring form events here
  numericUpDown1.Value = 500;
  numericUpDown2.Value = 50;
  numericUpDown3.Value = 0;
  // resume detecting form events here !
  </code></pre>
  
  <p>Is there a way to turn this on and off?  is it something that I should worry about?</p>
  
  <p>The best thing my limited C# knowledge leads me to a this point is to create a variable called "<code>bIgnoreEvents</code>" and use it in each of my <code>ValueChanged</code> Methods ...</p>
  
  <pre><code>private void numericUpDown1_ValueChanged(object sender, EventArgs e)
  {
      if (!bIgmoreEvents)
      {
          //do some complicated code ...
      }
  }
  </code></pre>
  
  <p>this would skip the code but seems messy.  Is there a simpler way?</p>