I have seen too many projects over the years trying to do input validation by checking KeyPress. This is not limited to Delphi projects (C#, VB and other projects suffer from this just as much). Most of these projects suffer from these::
- Much of the KeyPress logic logic in the UI byusing half-baked copy-pasted code fragments.
- They all fail missing important functionality (like paste, clear, Ctrl-key handling and such) either supporting or suppressing that functionality where needed
If doing Delphi, then that code should be rewritten in a generic way based on examples like like these:
- http://www.devsuperpage.com/search/Articles.asp?ArtID=857874 [WayBack]
- https://groups.google.com/forum/#!search/TNumberEdit$20Peter$20Below
–jeroen
Filed under: .NET, Delphi, Development, Software Development, Windows Development
