DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

about print graphics

 
   Reply to topic    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
dennis
Member


Joined: 05 Jan 2005
Posts: 5

PostPosted: 05/01/05 08:09    Post subject: about print graphics Reply with quote

how to print graphics
like lines, rectangle and all that
thanks
Back to top
View user's profile
Stefan
Junior Member


Joined: 27 Sep 2004
Posts: 79
Location: Netherlands

PostPosted: 05/01/05 16:36    Post subject: Reply with quote

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
View user's profile Send e-mail
dennis
Member


Joined: 05 Jan 2005
Posts: 5

PostPosted: 06/01/05 00:40    Post subject: thanks :) Reply with quote

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
View user's profile
Stefan
Junior Member


Joined: 27 Sep 2004
Posts: 79
Location: Netherlands

PostPosted: 11/01/05 09:20    Post subject: Reply with quote

You're asking the wrong person Smile

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! Smile
Back to top
View user's profile Send e-mail
dennis
Member


Joined: 05 Jan 2005
Posts: 5

PostPosted: 14/01/05 01:06    Post subject: thanks:) Reply with quote

thank you very much

i will try it Smile Razz Razz
Back to top
View user's profile
Stefan
Junior Member


Joined: 27 Sep 2004
Posts: 79
Location: Netherlands

PostPosted: 14/01/05 09:48    Post subject: Reply with quote

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
View user's profile Send e-mail
Display posts from previous:   
   Reply to topic    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group