I am working on a little application that allows adding and deleting pages to a TabControl at runtime.
When you select Delete Page I do this:
Me.SmartPadTabControl.TabPages.Remove(SmartPadTabControl.SelectedTab)
Seems to work fine, but after deleting the page, I cannot close the application by closing the window??? I put a line of code in the MyBase.Closing Event handler and set a breakpoint there, but when I try to close the window we never enter that event code at all.
Yet, all other program functions work, so I'm not stuck in a loop somewhere,e tc.
The window closes fine as long as I dont select the Delete Tab menu option. Once I do select the Delete Tab operation, the only way to get out of the application is to select Debug/Stop Debugging from the VS menu.
Any thoughts on how I can debug this?
