Autor Beitrag
Gahero
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 193

Win Vista HP 64bit
Delphi 2007 Pro
BeitragVerfasst: So 17.09.06 17:06 
Hi,

ich hab folgendes Problem.
Ich hab mein Programm soweit fertig und auch der Button "Drucken" funktioniert, aber halt nicht richtig. Bei dem Druck fehlt auf der rechten Seite min. 1/3 von der Form1. Was kann ich tun? Wie drucke ich im Querformat. Und wie kann ich den Druck auf Seitengröße anpassen?
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 17.09.06 17:08 
Wie druckste dennn? (Code)

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Gahero Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 193

Win Vista HP 64bit
Delphi 2007 Pro
BeitragVerfasst: So 17.09.06 17:09 
Ja, einfach:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.Button3Click(Sender: TObject);
begin
  Form1.Print;
end;
Gahero Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 193

Win Vista HP 64bit
Delphi 2007 Pro
BeitragVerfasst: Mo 18.09.06 13:31 
Keiner eine Idee?
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mo 18.09.06 13:36 
Hallo Gahero,

ich nehme an du bist Anfänger und die Aufgabe ist nicht ganz einfach.
Du musst wohl die Zeichenfläche vom Formular (Form1.Canvas) auf die Zeichenfläche des Druckers kopieren (uses Printers). Um nun die Größe Anzupassen musst du die Eigenschaften des Objekts TPrinter auslesen und die Zeichenfläche mit etwas mathematik und StretchDraw auf die entsprechende Größe verkleinern. Da das Druckerobjekt allerdings nur die Größe des Blattes, aber nicht der Ränder zurückgibt (wenn ich das richtig in Erinnerung habe), musst du auf Api zurückgreifen. Ich weiss diese allerdings nicht auswendig, aber die findest du hier im Forum.

Deswegen, bevor du damit anfängst hier im Forum suchen. Wenn du dann nicht weiter kommst, kann ich auch mal danach kramen. Aber zum Thema Drucken gibt es hier schon eine ganze Menge!

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Gahero Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 193

Win Vista HP 64bit
Delphi 2007 Pro
BeitragVerfasst: Mo 18.09.06 13:58 
Ich hab vorher schon lange gesucht, aber weder bei Goggle noch hier was brauchbares gefunden!
iKilledKenny
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 394
Erhaltene Danke: 8

Win XP
D5 Prof, C# Express 2005
BeitragVerfasst: Mo 18.09.06 14:18 
soweit ich weiss, geht das auch mit

ausblenden Delphi-Quelltext
1:
MyForm.PrintScale := poPrintToFit;					


grüße
alex
Gahero Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 193

Win Vista HP 64bit
Delphi 2007 Pro
BeitragVerfasst: Mo 18.09.06 14:24 
Jo, geht! Besten Dank!
5M17H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164

XP, Vista32, bald auch Vista64
PHP(3/5), Delphi(2), Java(1), C(3), C#(1)
BeitragVerfasst: Mo 18.09.06 15:24 
Wie kann ich ein Memo drucken?
Bevor jemand was sagt: Ich habe mir den Crashcours und einige Tutorials angesehen. Da werden keine Memos gedruckt.

Ich habe jetzt einen Texteditor geschrieben, und will mit dem auch Drucken können. Wie mache ich das?
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: Mo 18.09.06 15:45 
SUCHEN!

@KennyKiller: Danke, dass hat mir einiges an Aufwand erspart ;)!

Gruß Hape!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.