There are some suggestions for 2009-2010 versions of Delphi:
1. I don't understand why in
CODE
Windows.DrawText(Canvas.Handle, PAnsiChar(StringText), Length(StringText), ARect, Flags);
you use casting to PAnsiChar. Second parameter in DrawText has PWideChar type in Unicode versions of Delphi. PChar would be enough.
2. You can use CharInSet function when you check symbols instead of IN operator. Better way - using TCharacter class for standard tasks (IsNumber and so on), direct comparison for easy checks (... = '$') and real WideCharSet for complex checks (see DeHL for example).
3. CodeGear implements a warnings on the dangerous Thread.Suspend and Thread.Resume at last. You use those methods in not so harmful scenarios, but warnings are the evil.
Thanks.



Find content
Male
