Detect MouseUp in a Delphi Button Component when An Error Occurs

I made a button component in Delphi, and I write a code with error (strtoint('a');) in my button mouseup event. When I click the button, an error message raising and the button state remains pressed. There is the same problem with TSpeedButton too, but TButton has not this problem (I think because it is a standard windows control). Is there any code to add to my button component to remove this bug?


I found the problem, I should add code to restore button to normal state, in WM_KILLFOCUS message procedure.

Need Your Help

How to validate a filename in JAVA to resolve CWE ID 73(External Control of File Name or Path) using ESAPI?

java owasp esapi veracode

I am facing this security flaw in my project at multiple places. I don't have any white-list to do a check at every occurrence of this flaw. I want to use ESAPI call to perform a basic blacklist ch...

Wordpress - How can I loop into two different DIVS without repeating the DIVs

php jquery wordpress-theming wordpress

I am having a little trouble trying to figure out how I can accomplish this: I have a container with two colums in it, a right and a left column. Each column will have 3 posts with a short excerpt