Transparent bitmap

Here is the simple way to make a transparent bitmap. Note that the mask is created automatically at runtime.

MaskBitmap := TBitmap.Create;
MaskBitmap.Assign(SrcBitmap );
MaskBitmap.Mask(FColor);	{transparent color}
BitBlt(DestBitmap.Canvas.Handle, x, y, 
       SrcBitmap.Width, SrcBitmap.Height,
       MaskBitmap.Canvas.Handle, 0, 0, SRCAND);
BitBlt(DestBitmap.Canvas.Handle, x,y,
       SrcBitmap.Width, SrcBitmap.Height,
       SrcBitmap.Canvas.Handle, 0, 0, SRCINVERT);
MaskBitmap.Free;