AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Drucken?

Ein Thema von Chriss · begonnen am 23. Feb 2003 · letzter Beitrag vom 5. Mai 2003
Antwort Antwort
Benutzerbild von Chriss
Chriss

Registriert seit: 6. Aug 2002
Ort: Ahlen
124 Beiträge
 
Delphi 7 Enterprise
 
#1

Drucken?

  Alt 23. Feb 2003, 15:16
Hi @ all!
Finde es zwar doof, zwei anfragen gleichzeitig laufen zu lassen, nur ahben die nichts miteinander zu tun. Also...
ich möchte einen Teil meines Forms ausgedruckt haben... Per Button!

Das Problem an der Sache ist, dass es zwei Dinge sein müssen...
Einmal soll das Diagramm und einmal Soll das Memo ausgedruckt werden...
Programm exe ist dabei... wie amche ich das denn?

ach ja, bitte, wenn runtergeldaen wurde, erst die Wichtig.txt lesen!
Angehängte Dateien
Dateityp: zip wichtig___.zip (386,1 KB, 18x aufgerufen)
I'll be right there - I'll never leave - All I ask of you is ~ Believe
(Christopher Michael Oliva ~ 1963-1993 [Savatage]
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#2
  Alt 23. Feb 2003, 16:50
Mit Memo drucken, meinst du da einfach den Text, der im Memo ist, oder nur den Ausschnitt, den man sieht?
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Benutzerbild von Chriss
Chriss

Registriert seit: 6. Aug 2002
Ort: Ahlen
124 Beiträge
 
Delphi 7 Enterprise
 
#3
  Alt 23. Feb 2003, 16:58
also, einmal ALLES was im memo steht, allerding im gleichen zug auch das diagramm1
I'll be right there - I'll never leave - All I ask of you is ~ Believe
(Christopher Michael Oliva ~ 1963-1993 [Savatage]
  Mit Zitat antworten Zitat
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#4
  Alt 23. Feb 2003, 17:03
Zum Memo:

To print the contents of a memo component:

1. Assign a text-file variable to the printer by calling AssignPrn.
2. Create and open the output file by calling Rewrite.
Any Write or Writeln statements sent to the file variable are then written on the Canvas of the printer object.

The AssignPrn procedure is declared in the Printers unit, so you must add Printers to the uses clause of the unit that calls AssignPrn.

When the printer is ready for input, you can write the contents (Lines property) of the memo to the printer.

oder:

he VCL TPrinter object encapsulates details of Windows printers. To get a list of installed and available printers, use the Printers property. The CLX TPrinter object is a paint device that paints on a printer. It generates postscript and sends that to lpr, lp, or another print command.
Both printer objects use a TCanvas (which is identical to the form's TCanvas) which means that anything that can be drawn on a form can be printed as well. To print an image, call the BeginDoc method followed by whatever canvas graphics you want to print (including text through the TextOut method) and send the job to the printer by calling the EndDoc method.

This example uses a button and a memo on a form. When the user clicks the button, the content of the memo is printed with a 200-pixel border around the page.
To run this example successfully, add Printers to your uses clause.
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);

var
  r: TRect;
  i: Integer;
begin
  with Printer do
    begin
      r := Rect(200,200,(Pagewidth - 200),(PageHeight - 200));
      BeginDoc;
      for i := 0 to Memo1.Lines.Count do
       Canvas.TextOut(200,200 + (i *
Canvas.TextHeight(Memo1.Lines.Strings[i])),
                                   Memo1.Lines.Strings[i]);
      Canvas.Brush.Color := clBlack;
      Canvas.FrameRect(r);
      EndDoc;
    end;

end;
oder:

nimm ein RichEdit, das kann man per "RichEdit1.Print" drucken...
[Edit=FuckRacism]Delphi-Tags eingefügt[/Edit]
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
Benutzerbild von Chriss
Chriss

Registriert seit: 6. Aug 2002
Ort: Ahlen
124 Beiträge
 
Delphi 7 Enterprise
 
#5
  Alt 23. Feb 2003, 17:07
und wie mache ich das mit dem diagramm
I'll be right there - I'll never leave - All I ask of you is ~ Believe
(Christopher Michael Oliva ~ 1963-1993 [Savatage]
  Mit Zitat antworten Zitat
dopeline

Registriert seit: 7. Mär 2003
Ort: Berlin
304 Beiträge
 
Delphi 7 Enterprise
 
#6
  Alt 5. Mai 2003, 21:43
Ich hab da mal noch 2 Fragen:


1. wie kann ich meherere Memos hintereinander gehängt ausdrucken?

2. Wie Erstelle ich über dem Ausdruck des Memos die jeweilige bezeichnung?
z.b. beim ausdruck von memo1 steht darüber "Allgemeines" o.a.


Grüße, dopeline
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#7
  Alt 5. Mai 2003, 22:26
Nimm den Code den Nailor gepostet hat und zeichen unter den Text vom Memo das Diagramm mit den Canvas-Methoden.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz