[求助]QRImage预览10次左右就整个变成黑的了,谁碰到过么?(200分)

  • 主题发起人 主题发起人 thtfsyh
  • 开始时间 开始时间
T

thtfsyh

Unregistered / Unconfirmed
GUEST, unregistred user!
开发环境Delphi 4 + sp3,xp的系统.
真的很奇怪啊!
 
使用流,每次更新
 
使用流,每次更新
--请明示,多谢!
 
问题可能找到了,谁有for delphi 4的QR的源码?
 
http://www.qusoft.com/Imagefix2.html

Images appearing blacked out on printed reports, or images are missing and produce blank page. The fix is here. (27th October 2003)

Black Box Image Bug :
=====================

Changes to File QRCtrls.pas - remove all references to PrintBitmap, use stretchdraw only.
Replace the current code with this -

If you're using TQRGrImage, make the same changes to TQRGrImage.Print in GrImgCtrl.pas

procedure TQRImage.Print(OfsX,OfsY : Integer);
var
Dest : TRect;
DC, SavedDC : THandle;
begin
Dest.Top := QRPrinter.YPos(OfsY + Size.Top);
Dest.Left := QRPrinter.XPos(OfsX + Size.Left);
Dest.Right := QRPrinter.XPos(OfsX + Size.Width + Size.Left);
Dest.Bottom := QRPrinter.YPos(OfsY + Size.Height + Size.Top);

if Stretch then
begin

// remove all references to PrintBitmap, use stretchdraw only
QRPrinter.Canvas.StretchDraw(Dest, Picture.Graphic);

end else
begin
IntersectClipRect(QRPrinter.Canvas.Handle, Dest.Left, Dest.Top, Dest.Right, Dest.Bottom);
DC := GetDC(QRPrinter.Canvas.Handle);
SavedDC := SaveDC(DC);
Dest.Right := Dest.Left +
round(Picture.Width / Screen.PixelsPerInch * 254 * ParentReport.QRPrinter.XFactor);
Dest.Bottom := Dest.Top +
round(Picture.Height / Screen.PixelsPerInch * 254 * ParentReport.QRPrinter.YFactor);
if Center then OffsetRect(Dest,
(QRPrinter.XSize(Size.Width) -
round(Picture.Width / Screen.PixelsPerInch * 254 * ParentReport.QRPrinter.XFactor)) div 2,
(QRPrinter.YSize(Size.Height) -
round(Picture.Height / Screen.PixelsPerInch * 254 * ParentReport.QRPrinter.YFactor)) div 2);

//and again.
QRPrinter.Canvas.StretchDraw(Dest, Picture.Graphic);

RestoreDC(DC, SavedDC);
SelectClipRgn(QRPrinter.Canvas.Handle, 0);
end;
inherited Print(OfsX,OfsY);
end;


 
请各位帮忙看看,多谢!
 
开发环境Delphi 4 + sp3,xp的系统.????
XP操作系统用D4???不能升级吗?用D5 D6 D7 都可以啊!!
实在不行就去升级QR吧!盒子里面有的!
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
778
import
I
I
回复
0
查看
860
import
I
后退
顶部