Solved

The right Delphi component for printing

Posted on 2003-11-04
4
158 Views
Last Modified: 2013-11-23
Anyone knows of a good component that can print a dbgrid (with preview).
0
Comment
Question by:CodedK
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
DeerBear earned 20 total points
ID: 9685120
Hi,

Most printing suites are about reports, so you should either transfer the grids' content to a
report or build yourself a component that does what you ask.

I don't have too much time now, but it should look like this:

Type

    TPrintComponent = class( TComponent )
    published
       
         property Source : TComponent;
         property PreviewPane : TPaintBox;
   end;


Then you'd use the Windows APIs to get the DC of the component you want and then
would draw it on the PreviewPane and then print it out.

That's basically how you'll make it.

HTH,

Andrew
0
 
LVL 3

Expert Comment

by:ThoseBug
ID: 9685682
use this component.
http://www.delphi32.com/vcl/763/
0
 
LVL 3

Expert Comment

by:ThoseBug
ID: 9686188
wath kind the answer is this?...unbelieve this.
0
 
LVL 16

Author Comment

by:CodedK
ID: 9690365
Yes i dont believe this too. I press accept for the wrong person.
Sorry.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question