| View previous topic :: View next topic |
| Author |
Message |
dennis Member
Joined: 05 Jan 2005 Posts: 5
|
Posted: 05/01/05 08:09 Post subject: about print graphics |
|
|
how to print graphics
like lines, rectangle and all that
thanks |
|
| Back to top |
|
 |
Stefan Junior Member
Joined: 27 Sep 2004 Posts: 79 Location: Netherlands
|
Posted: 05/01/05 16:36 Post subject: |
|
|
From the Delphi help:
This example uses a button, a Page Control, and a Print dialog box on a form. When the user clicks the button, the print dialog is displayed. The user can select any subset of the pages in the page control for printing. The selected pages are then printed.
To run this example successfully, you must add the Printers unit to the uses clause of your unit.
| Code: |
procedure TForm1.Button1Click(Sender:TObject);
var
I, Start, Stop: Integer;
begin
PrintDialog1.Options := [poPageNums, poSelection];
PrintDialog1.FromPage := 1;
PrintDialog1.MinPage := 1;
PrintDialog1.ToPage := PageControl1.PageCount;
PrintDialog1.MaxPage := PageControl1.PageCount;
if PrintDialog1.Execute then
begin
{ determine the range the user wants to print }
with PrintDialog1 do
begin
if PrintRange = prAllPages then
begin
Start := MinPage - 1;
Stop := MaxPage - 1;
end
else if PrintRange = prSelection then
begin
Start := PageControl1.ActivePage.PageIndex;
Stop := Start;
end
else { PrintRange = prPageNums }
begin
Start := FromPage - 1;
Stop := ToPage - 1;
end;
end;
{ now, print the pages }
with Printer do
begin
BeginDoc;
for I := Start to Stop do
begin
PageControl1.Pages[I].PaintTo(Handle, 10, 10);
if I <> Stop then
NewPage;
end;
EndDoc;
end;
end;
end;
|
|
|
| Back to top |
|
 |
dennis Member
Joined: 05 Jan 2005 Posts: 5
|
Posted: 06/01/05 00:40 Post subject: thanks :) |
|
|
hi
thank you very much
perhaps my question is obscurity
i am using Express FlowChart
the FlowChart do not provide the print function,
i want to print it use
can you help me ?
following URL is Express FlowChart suit
http://www.devexpress.com/Downloads/vcl/exflowchart/ |
|
| Back to top |
|
 |
Stefan Junior Member
Joined: 27 Sep 2004 Posts: 79 Location: Netherlands
|
Posted: 11/01/05 09:20 Post subject: |
|
|
You're asking the wrong person
Try using TSimpleGraph / TExtGraph instead. Information can be found on the product page of this site: http://www.delphiarea.com/products/simplegraph/
It has full support for your flowcharting and printing needs. Yes, all that, and it's free and opensource!  |
|
| Back to top |
|
 |
dennis Member
Joined: 05 Jan 2005 Posts: 5
|
Posted: 14/01/05 01:06 Post subject: thanks:) |
|
|
thank you very much
i will try it  |
|
| Back to top |
|
 |
Stefan Junior Member
Joined: 27 Sep 2004 Posts: 79 Location: Netherlands
|
Posted: 14/01/05 09:48 Post subject: |
|
|
I recommend you keep an eye on the sourceforge page, as there will be an update there soon (as you can read in the news section on the site:
http://sourceforge.net/projects/extgraph )
Anyway good luck with it, and if you want to request any features or want to report a bug or simply tell us what you are using it for, we will be most grateful.
Cheers,
Stefan
[/url] |
|
| Back to top |
|
 |
|