TO hs-kill:
谢谢你。出错的代码:
Procedure TForm1.DrawQushitu(wendu:double);//监测数据转化为温度后做参数
var
Xjiange,Yjiange,zbX,zbY,zuobiaoX,zuobiaoY:integer; //X轴为时间,Y轴为温度
begin
Xjiange:=1; //时间/每像素,15分钟/60像素=1; //原:30分钟/60像素
Yjiange:=1; //温度/每像素,50/50=1
Form2.Image1.Canvas.Pen.Style:=PsInsideFrame;//??出错。提示说“写兄弟制错误”
Form2.Image1.Canvas.Pen.Width:=3; // 画到子窗体的image上
Form2.Image1.Canvas.Pen.Color:=clBlue;
zbX:=30;zbY:=350; //原点坐标
zuobiaoX:=zbX+Round(wendu*Xjiange);//以温度wendu做参数
zuobiaoY:=zbY-Round(wendu*Yjiange);
Form2.Image1.Canvas.MoveTo(zuobiaoX,zuobiaoY);
Form2.Image1.Canvas.LineTo(zuobiaoX,zuobiaoY);
end;