title: TreeView fires the BeforeSelect event multiple times
body: <p>I am using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.aspx" rel="nofollow">Windows Forms <code>TreeView</code></a> control.</p>
  
  <p>The way i have it hooked up is as followed (simplified):</p>
  
  <pre><code>TreeView treeView = new TreeView();
  
  treeView.BeforeSelect += beforeSelect;
  
  private void beforeSelect(sender, args)
  {
       MessageBox.Show("Some msg");
  
       // more code
  }
  </code></pre>
  
  <p>In certain scenarios, the call to <strong><em>MessageBox.Show</em></strong> triggers another raising of the <strong><em>BeforeSelect</em></strong> event, which triggers another, and another, ...</p>
  
  <p>It seems this event is raised PER ITEM in the treeview (i have counted the number of times it is raised).</p>
  
  <p>I have searched all over the internet on more information for why this could occur.</p>
  
  <p>One thing i've found was that TreeView will automatically select the first node when gaining focus.
  This does not explain however why the event is fired as the number of treenode items in the tree.</p>
  
  <p>Any help would be appreciated on this. I am considering raising a Microsoft Connect bug for this, as it seems like a very weird behavior that is not consistent with how i think the control should work.</p>