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.