We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Forms refuse to action on close requests

Thread ID:





11195 Feb 26,2004 11:19 AM UTC Mar 10,2004 08:34 PM UTC WinForms 2
Tags: FAQ
Apolon Ivankovic
Asked On February 26, 2004 11:19 AM UTC

Occasionally I get Winform apps which refuse to react to a close request - either via the close cross at the top right of the form or a programmatic Form.Close() method call. The scenario is rare but does happen often enough to be a pain to users. The only recourse for users is then to kill the app with the task manager. Have the Syncfusion staff experienced this behaviour? Is it a Winforms bug or does it typically occur as a result of an app programming error? If it''s the latter, how can you track down what code is causing the problem?

Administrator [Syncfusion]
Replied On February 29, 2004 07:00 AM UTC

Off my head, this is caused by bug in Windows Forms. The reason is that somewhere there is a control that got invisible while keeping keyboard focus. Actually Windows Forms tries to Validate control and fails, and then refuses to Close form. Usually, this happens when you have a panel and you show/hide it following application logic. Solution would be focusing another, visible control before hiding panel, for example navigation pane or status bar.

Administrator [Syncfusion]
Replied On March 10, 2004 08:34 PM UTC

orangy is right-on, I''ve had to deal with this in the past as well. In addition to the panel situation described, it can also occur if the focus is on a control in a tabpage, then you remove the tabcontrol from the form programmatically.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon