Component PrintControl: Preview and print any control
Submitted By:
Unknown
Rating:
(Not rated) (
Rate It)
(***************************************************************************)
(* *)
(* ##### ##### ##### ##### ##### #### ###### ####### *)
(* # # # # # # # # # # *)
(* # # # # ### # #### # # ### # *)
(* # # # # # # # # # # # *)
(* ##### ##### ##### ##### ##### #### # # *)
(* *)
(***************************************************************************)
{
(c) 1995 Cogisoft
This component is FREE distribution. Use it for your own utilization.
But you can't sell an application, using this component, without the
authorization of Cogisoft.
COGISOFT,H?tel de M?zi?res,19 rue Michel Le Comte,75003 PARIS,FRANCE
Tel:(33)(1)40-65-04-04, FAX:(33)(1)42-72-27-87
Jerome VOLLET, CompuServe : 100560,3342
}
After Lingua ...
Component PrintControl: Preview and print any control
( No icon, but full source code included )
First, try it !!! ... then give me your feedback. Thank you very much.
Register component : PRTCTRL.DCU
To install the component, choose in the menu Options|Install components...
then add the file prtctrl.dcu.
Let's try the demo project1.dpr
To run it, you need an alias DBDEMOS.
TECHNICAL ....
properties :
PrintScale : Default poProportionnal ( recommended )
PixelPerInch : Don't touch ( recommended )
ResizeForm : resize the current form to the proportions of the printer
device. This is a good idea, so you can work on the form at
design time exactely like the form will be printed.
methods :
TPrintControl.Print( Control : TWinControl );
PrintControl1.Print( Panel1 );
PrintControl1.Print( Form1 );
TPrintControl.Preview( Control : TWinControl );
PrintControl1.Preview( Panel1 );
PrintControl1.Preview( Form1 );
PHILOSOPHIC ....
Component PrintControl is NOT a component for reports. But it can help you
in a way to print some very simple things. All is built in Delphi, because
I think Delphi is the best interface builder you can get on the place, so
don't work against Delphi, using external reports' editors. Don't create
specific components for reporting, because you get already about hundreds
graphical components in the palette. Graphical components mean that if you
can draw them in a Form or in a Panel, so you will be able to print this
Form or this Panel. It's not more difficult. This example prove it !!! So
learn to work in the way of Delphi.
More ... it's so easy to create dynamically components at run-time, use
this functionnality to build your most complicated report.
What can you improve ???
You can create some components like Header, Footer and Group. When it's
done, please send me this three components. Thank you very much.
Have fun with this PrintControl !!!
See you very soon for the next component : ErrorQuid.
Jerome.