Hi Yuriy,
Known issue when you juggle with dynamically created controls. You should
call OnControlRemoved method on the ultimate control's container just after
you've removed the control from the container's Controls collection. This
method is protected as far as I remember, so if you use Panels, you should
probably create a container control inherited from the Panel.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Yuriy Zubarev" <yu***********@yahoo.ca> wrote in message
news:3f**************@shawnews.vc.shawcable.net...
Hello everyone,
I have main application form (child of System.Windows.Forms.Form) that
hosts quite a number of different visual components. Some time after
working with those components, the form refuses to be closed - I click
menu item that invokes Form.Close() method, I click 'close' icon on
the caption of the window (form) - nothing happens. No event comes to
Form_Closing(Object, CancelEventArgs) method either.
I'm at a loss how to even start debugging this situation and I would
appreciate any suggestions.
Thank you for your time,
Yuriy ZUbarev