百
百事
Unregistered / Unconfirmed
GUEST, unregistred user!
也有可能是程序不稳定,这个问题让我烦死了,有时候不知道怎么的就死了,我断点也
调不出来,请高手们帮我看看吧!我想可能是TIMER有问题,谢谢!!!
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOTable1.First;
image1.Canvas.MoveTo((adotable1.fieldbyname('时间').AsInteger)div(3),261-adotable1.fieldbyname('心率').AsInteger);
if not adotable1.Eof then
Timer1.Enabled:=True;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
Inxl,Insj:Integer;
Inlj:string;
begin
Timer1.Enabled:=False;
if not adotable1.Eof then
begin
inxl:=adotable1.fieldbyname('心率').AsInteger;
insj:=adotable1.fieldbyname('持续时间').AsInteger;
if adotable2.Locate('心率',inxl,[locaseinsensitive]) then
begin
inlj:=adotable2.fieldbyname('心率路径').AsString;
end;
mmwaveplayer1.FileName:=inlj;
mmwaveplayer1.Play;
mmwaveplayer1.Looping:=true;
timer1.Interval:=insj*1000;
timer1.Enabled:=true;
adotable1.Next;
image1.Canvas.Pen.Width:=3;
image1.Canvas.Pen.Color:=clred;
image1.Canvas.LineTo((adotable1.fieldbyname('时间').AsInteger)div(3),261-adotable1.fieldbyname('心率').AsInteger);
end;
end;
end.
调不出来,请高手们帮我看看吧!我想可能是TIMER有问题,谢谢!!!
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOTable1.First;
image1.Canvas.MoveTo((adotable1.fieldbyname('时间').AsInteger)div(3),261-adotable1.fieldbyname('心率').AsInteger);
if not adotable1.Eof then
Timer1.Enabled:=True;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
Inxl,Insj:Integer;
Inlj:string;
begin
Timer1.Enabled:=False;
if not adotable1.Eof then
begin
inxl:=adotable1.fieldbyname('心率').AsInteger;
insj:=adotable1.fieldbyname('持续时间').AsInteger;
if adotable2.Locate('心率',inxl,[locaseinsensitive]) then
begin
inlj:=adotable2.fieldbyname('心率路径').AsString;
end;
mmwaveplayer1.FileName:=inlj;
mmwaveplayer1.Play;
mmwaveplayer1.Looping:=true;
timer1.Interval:=insj*1000;
timer1.Enabled:=true;
adotable1.Next;
image1.Canvas.Pen.Width:=3;
image1.Canvas.Pen.Color:=clred;
image1.Canvas.LineTo((adotable1.fieldbyname('时间').AsInteger)div(3),261-adotable1.fieldbyname('心率').AsInteger);
end;
end;
end.