M
mayong
Unregistered / Unconfirmed
GUEST, unregistred user!
我试了利用多煤体定时器,可以实现精确定时,在此谢谢茶叶蛋和CJ先生!!
但当用于控件时,每当时间时间到而执行以下代码(控件的Public声明),
定时事件马上不工作. 各位大虾,帮忙分析???
procedure TARollor.TimeTick;
begin //
if FTimerTickEnable=False then exit;
if Assigned(FContinueEvent) then FContinueEvent(Self);
if FInvert then
BitBlt(Canvas.Handle,0,0,FBitmap.Width,FBitmap.Width,
FBitmap.Canvas.Handle,
0,FData*FBitmap.Width+Inci,NOTSRCCOPY)
else
BitBlt(Canvas.Handle,0,0,FBitmap.Width,FBitmap.Width,
FBitmap.Canvas.Handle,
0,FData*FBitmap.Width+Inci,SRCCOPY);
inc(Inci);
end;
但当用于控件时,每当时间时间到而执行以下代码(控件的Public声明),
定时事件马上不工作. 各位大虾,帮忙分析???
procedure TARollor.TimeTick;
begin //
if FTimerTickEnable=False then exit;
if Assigned(FContinueEvent) then FContinueEvent(Self);
if FInvert then
BitBlt(Canvas.Handle,0,0,FBitmap.Width,FBitmap.Width,
FBitmap.Canvas.Handle,
0,FData*FBitmap.Width+Inci,NOTSRCCOPY)
else
BitBlt(Canvas.Handle,0,0,FBitmap.Width,FBitmap.Width,
FBitmap.Canvas.Handle,
0,FData*FBitmap.Width+Inci,SRCCOPY);
inc(Inci);
end;