procedure ShowLonLat1(var mLonLat : boolean;Viewimage1:TImage);
var
i,j,x_s,y_s:integer;
begin
if mLonLat then
with ViewImage1 do begin
Canvas.Pen.Color:= clYellow;
for i:=1 to 7 do
begin
x_s:=round((i*ViewImage1.Width)/8);
Canvas.MoveTo(x_s,0);
y_s:= round(ViewImage1.Height);
Canvas.lineTo(x_s,y_s);
end;
for j:=1 to 5 do
begin
y_s:=round((j*ViewImage1.Height)/6);
Canvas.MoveTo(0 ,y_s);
x_s:= round(ViewImage1.Width);
Canvas.lineTo(x_s,y_s);
end;
end
else
exit;
end;
procedure TForm1.FormResize(Sender: TObject);
var
b: Boolean;
begin
b := True;
with Image1 do begin
Picture.Bitmap.Width := Width;
Picture.Bitmap.Height := Height;
Canvas.FillRect(Canvas.ClipRect);
end;
ShowLonLat1(b, Image1);
end;
如果觉得太闪,就加上
procedure TForm1.FormCreate(Sender: TObject);
begin
DoubleBuffered := True;
end;