V
Victortim
Unregistered / Unconfirmed
GUEST, unregistred user!
看这个,没问题,背景不会变为白色:
procedure TForm1.FormShow(Sender: TObject);
begin
with image1.canvas do
begin
//把image设置为黑色背景
Brush.Color := clBlack;
Brush.Style := bsSolid;
Rectangle(0,0,image1.width,image1.height);
//画一对角线
moveto(0,0);
pen.color:=clwhite;
lineto(100,100);
moveto(0,100);
lineto(100,0);
end;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
with image1.canvas do
begin
//把image设置为黑色背景
Brush.Color := clBlack;
Brush.Style := bsSolid;
Rectangle(0,0,image1.width,image1.height);
//画一对角线
moveto(0,0);
pen.color:=clwhite;
lineto(100,100);
moveto(0,100);
lineto(100,0);
end;
end;