Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I thought you wanted LastChild to show up in the messagebox? That would show FirstChild? Commented Oct 7, 2009 at 13:31
  • I don't know if i;m imagining things but I foudn it works also even without the "new EventHandler, just with e.g. item.Click+=itemClick; I just tried adding a panel to a form and doing panel.Click+=p_click; idea from wonky79 here stackoverflow.com/questions/17047355/… Commented Dec 23, 2015 at 15:49
  • @barlop sure you got it right. probably when this was originally answered that way of adding eventhandlers was not there or I just put it for regular way of doing it. item.Click += itemClick is syntactic sugar for expression in answer. Commented Dec 24, 2015 at 0:11