I was trying to keep track of a lot of TextBoxes, and using the .Handle seemed the obvious choice...
And when the form closes it fires the textbox_Disposed(sender as object, e as eventargs) event the expected number of times (i.e. the number of textboxes), so far so good... BUT the sender.Handle is not the one for the textbox - it is just a "random" value - well i'm sure it points to something, but not any textbox i knew about.
Any ideas? I'm guessing by the time it calls the disposed event the texbox no longer exists.
And when the form closes it fires the textbox_Disposed(sender as object, e as eventargs) event the expected number of times (i.e. the number of textboxes), so far so good... BUT the sender.Handle is not the one for the textbox - it is just a "random" value - well i'm sure it points to something, but not any textbox i knew about.
Any ideas? I'm guessing by the time it calls the disposed event the texbox no longer exists.