SetRgnColorRGBRange example for Delphi
{This example sets a region corresponding to all colors that
have an rgb that includes red but no green and no blue}
var
rgbLo: TColorRef;
rgbHi: TColorRef;
begin
rgbLo:= RGB(1, 0, 0);
rgbHi:= RGB(255, 0, 0);
LEADImage1.SetRgnColorRGBRange (rgbLo, rgbHi, L_RGN_SET);
LEADImage1.RgnFrameType:= ftAnimated;
end;