Should not this code fill with red ? Instead fills with black. ... ?
PaintBox1.Canvas.pen.Color:= clRed;
PaintBox1.Canvas.FloodFill(i+1,j,clBlack,fsBorder);
BTW, what is default color of PaintBox1.Canvas, is it same as PaintBox1.color ? It does not seem to be the same.