Re: OpenPictureDialog Problems



Run Time Type Information (RTTI) which is used for "as" and "is"
operators is relatively slow. So once an object has been confirmed to
be of a particular type, then use a simple typecast on its reference.
So code ...

begin
if Sender is TManyShape then
begin
fCurrentShape :=TManyShape(Sender);
FCurrentShape.Invalidate;
if ssRight in Shift then
TManyShape(Sender).Tag := RIGHT_BUTTON_DOWN

Even though we have oodles of computing power, let's not waste it with
loose programming habits <g>.

Alan Lloyd

.


Quantcast