- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Printing Delphi controls

Question:

Can I print any standard Delphi control?

Answer:

No, a control has to be descending from TQRPrintable to 

be printed on a QuickReport.



However, if you want, you can drop a TQRImage on a 

QuickReport and then do something like this:



  procedure TForm1.Button1Click(Sender: TObject);

  var

    DC : HDC;

  begin

    DC := GetDC(Button1.Handle);

    BitBlt(QuickReport2.QRImage1.Canvas.Handle,0,0,

           Button1.Width,Button1.Height,DC,0,0,SrcCopy);

    ReleaseDC(Button1.Handle,DC);

    QuickReport2.Preview;

  end;




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile