daveh541 Posted June 26, 2003 Posted June 26, 2003 An odd thing occurs when I remove a tabpage programmatically from my tabcontrol (odd to me, maybe not to others), the program loses it's abillity to close. Can't click the little X button, no alt-f4, can't use my program's file menu- exit.... I have to to go into task manager and end the task. Any ideas? This only occurs when I keep the remove code in. If I set the File Menu - Exit to application.exit instead of me.close() it can quit, but I'm wondering if something is being overwritten, and how or if I can stop it. Thanks for any help. Quote
*Gurus* divil Posted June 26, 2003 *Gurus* Posted June 26, 2003 This is a bug in windows forms that occurs when you remove a control that contains the focus. To work around it, set the focus to another control outside the control you're removing just before you remove it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
daveh541 Posted June 27, 2003 Author Posted June 27, 2003 Thanks for the response. It fixed the problem. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.