透明图片做启动画面
提示:这里可以添加技术概要
核心源码
procedure CreateSplashFromFile(MyForm: TForm; MyFileName: String);
var
fimg: TPngImage;
pptDst, pptSrc: TPoint;
_pSize: TSize;
BlendFunction: TBlendFunction;
bmp: TBitmap;
begin
fimg := TPngImage.Create;
fimg.LoadFromFile(MyFileName);
bmp := TBitmap.Create;
bmp.Assign(fimg);
pptDst := Point(MyForm.Left, MyForm.Top);
pptSrc := Point(0, 0);
_pSize.cx := fimg.Width;
_pSize.cy := fimg.Height;
MyForm.ClientWidth := fimg.Width;
MyForm.ClientHeight := fimg.Height;
BlendFunction.BlendOp := AC_SRC_OVER;
BlendFunction.BlendFlags := 0;
BlendFunction.SourceConstantAlpha := $FF;
BlendFunction.AlphaF