Result := Integer(
((Cardinal(UpColor) and $FF00FF) * Cardinal(Amount) +
(Cardinal(DownColor) and $FF00FF) * Value) and $FF00FF00 +
((Cardinal(UpColor) and $00FF00) * Cardinal(Amount) +
(Cardinal(DownColor) and $00FF00) * Value) and $00FF0000) shr 8;
Play with the demo and click on the 2 buttons to open and close iForm2.
The pb occurs occasionnaly after clicking several times.












