about print graphics

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

about print graphics

Postby dennis » January 5th, 2005, 8:09 am

how to print graphics
like lines, rectangle and all that
thanks
dennis
Active Member
Active Member
 
Posts: 5
Joined: January 5th, 2005, 7:35 am

Postby Stefan » January 5th, 2005, 4:36 pm

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: Select all
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;
User avatar
Stefan
Moderator
Moderator
 
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands

thanks :)

Postby dennis » January 6th, 2005, 12:40 am

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/
dennis
Active Member
Active Member
 
Posts: 5
Joined: January 5th, 2005, 7:35 am

Postby Stefan » January 11th, 2005, 9:20 am

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! :)
User avatar
Stefan
Moderator
Moderator
 
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands

thanks:)

Postby dennis » January 14th, 2005, 1:06 am

thank you very much :wink: :wink:

i will try it :) :P :P
dennis
Active Member
Active Member
 
Posts: 5
Joined: January 5th, 2005, 7:35 am

Postby Stefan » January 14th, 2005, 9:48 am

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]
User avatar
Stefan
Moderator
Moderator
 
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 2 guests

cron