In certain circumstances within the application which I wrote in C++ Builder 4/5, a dialog cannot be closed by pressing its cancel button. Generally I just click the Cancel button or press escape (ie I have the "Cancel" property of the button set to true) to close the dialog. The event handler for the close button calls Hide(), but I have also tried, SetFocus(), Update(), Visible = FALSE, just to name a few. I have come to the conclusion that when the problem occurs my event handler is not being called when the button is clicked. ie somehow the Event seems to be getting lost!!??? (The problem doesn't occur when running in the debug environment).
Has anybody experienced similar behaviour or have any suggestions for a possible remedy?
Has anybody experienced similar behaviour or have any suggestions for a possible remedy?