各位专家或高手:
大家好!...由于本人是初学者,所以请教一下大家!..望大家帮一下忙!...本人在Delphi5中编译(Compile)之前完成的程序,按了编译后出现一个错误窗体的提示.内容如下:
Error Reading Form
Class TQRDiagonal not found .Ignore the error and continue?? NOTE: Ignoring the error may cause components to be detected or property values to be lost.请问窗体内的 TQRDiagonal 是不是第三方控件来的???....如果是的话,,请问该第三方控件是什么名字???麻烦各位专家或高手帮帮忙......谢谢!!^○^.
大家好!...由于本人是初学者,所以请教一下大家!..望大家帮一下忙!...本人在Delphi5中编译(Compile)之前完成的程序,按了编译后出现一个错误窗体的提示.内容如下:
Error Reading Form
Class TQRDiagonal not found .Ignore the error and continue?? NOTE: Ignoring the error may cause components to be detected or property values to be lost.请问窗体内的 TQRDiagonal 是不是第三方控件来的???....如果是的话,,请问该第三方控件是什么名字???麻烦各位专家或高手帮帮忙......谢谢!!^○^.
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
QuickRpt, Qrctrls;type
TLinePos = (lpLeftTop, lpRightTop, lpLeftBottom, lpRightBottom);
TQRDiagonal = Class(TQRShape)
Private
Function SetPoint(pPos: TLinePos; pRect: TRect): TPoint;
Protected
FPos1, FPos2: TLinePos;
Procedure SetPos1(pPos: TLinePos);
Procedure SetPos2(pPos: TLinePos);
Procedure Paint; Override;
Procedure Print(OfsX, OfsY: Integer); Override;
Published
Property Pos1: TLinePos Read FPos1 Write SetPos1;
Property Pos2: TLinePos Read FPos2 Write SetPos2;
End;procedure Register;implementationprocedure Register;
begin
RegisterComponents('QReport', [TQRDiagonal]);
end;Procedure TQRDiagonal.Paint;
Var
wPos1, wPos2: TPoint;
wRect: TRect;
Begin
Inherited;
With Self.Canvas Do
Begin
wRect := Rect(0, 0, Width, Height);
FillRect(wRect);
wPos1 := SetPoint(FPos1, wRect);
wPos2 := SetPoint(FPos2, wRect);
MoveTo(wPos1.x, wPos1.y);
LineTo(wPos2.x, wPos2.y);
End;
End;Procedure TQRDiagonal.Print(OfsX, OfsY: Integer);
Var
wPos1, wPos2: TPoint;
wRect: TRect;
Begin
Inherited;
If Self.QRPrinter.Canvas = nil Then Exit;
With Self.QRPrinter.Canvas Do
Begin
wRect := Rect((Parent as TQRBand).Left + Left - 1
, (Parent as TQRBand).Top + Top - 1
, (Parent as TQRBand).Left + Left + Width
, (Parent as TQRBand).Top + Top + Height);
FillRect(wRect);
wPos1 := SetPoint(FPos1, wRect);
wPos2 := SetPoint(FPos2, wRect);
MoveTo(wPos1.x, wPos1.y);
LineTo(wPos2.x, wPos2.y);
End;
End;Procedure TQRDiagonal.SetPos1(pPos: TLinePos);
Begin
FPos1 := pPos;
Paint;
End;Procedure TQRDiagonal.SetPos2(pPos: TLinePos);
Begin
FPos2 := pPos;
Paint;
End;Function TQRDiagonal.SetPoint(pPos: TLinePos; pRect: TRect): TPoint;
Begin
Case pPos Of
lpRightTop:
Result := Point(pRect.Right - 1, pRect.Top);
lpLeftBottom:
Result := Point(pRect.Left, pRect.Bottom - 1);
lpRightBottom:
Result := Point(pRect.Right - 1, pRect.Bottom - 1);
Else
Result := Point(pRect.Left, pRect.Top);
End;
End;end.