
Canvas.Pen.Color:=clBlack;
Canvas.Pen.Style:=psSolid;
Canvas.Brush.color:=clBtnFace;
Canvas.Brush.Style:=bsSolid; //此上是设置 Canvas 的一些属性,便于以后
//Clear Form and Load a new JPEG file;
Ajpeg:=TJpegImage.Create;//动态生成Ajpeg;
Ajpeg.LoadFromFile(’D:Temp.jpg’) //生成 Ajpeg 后,调入 JPEG 文件
Canvas.Rectangle(2,2,560,430); //画一个黑框的矩形将图片围住;
x:=10; y:=10;
Form1.Canvas.Draw(x,y,Ajpeg); //以(x,y)为左上角输出 JPEG 文件;
//实际上其作用是当图形被破坏是使图形恢复;
begin
if OpenPictureDialog1.Execute then
begin
Ajpeg.Free; //释放旧Ajpeg;
Ajpeg:=TJpegImage.Create; //产生一个新的Ajpeg;
Ajpeg.LoadFromFile(OpenPictureDialog1.Filename); //载入JPEG文件;
end;
Canvas.Rectangle(2,2,560,430); //将Form Clear;
x:=10;
y:=10;
Form1.Canvas.Draw(x,y,Ajpeg); //显示新的Ajpeg;
end;
in your *.dbr files do it
begin
{Create a splash form}
splash:=Tsplash.Create(self);
splash.Show;
splash.update
Application.Initialize;
Application.CreateForm(..)
.
.
.
splash.close;
splash.free;
Application.Run
end;