Autor Beitrag
Wolfgang
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 21.01.06 09:38 
Hi!

Ich brauche irgeneinen Befehl, mit dem ich nach auf dem Computer installierte Drucker suchen kann und sie einer ComboBox zur Auswahl hinzufügen kann.

Soweit dass ich den Text eines RichEdit drucken kann bin ich ja schon. Jedoch weiß ich nicht, welchen der installierten Drucker der Computer mit Printer auswählt oder wie ich diese Auswahl ändern kann.

Ich hab in der Delphi-Hilfe nachgesehen aber entwerder nichts gefunden, oder ich kenne mich einfach nicht genug damit aus.

thx im Vorhinein.

_________________
Two or three tons of stone can really get you down, and keep you there!
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 21.01.06 10:24 
Verwende doch die ComboBox, die Dir jeder PrintDialog bereitstellt.

_________________
Gruß
Hansa
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 21.01.06 10:28 
Schau dir mal in der Delphi Hilfe das TPrinterObjekt an. Das hat die Eigenschaft Printers. Über diese StingList bekommst du alle installieren Drucker.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Wolfgang Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mo 23.01.06 07:34 
Danke für die Beiträge.

Ich kannte PrintDialog zwar schon wusste nur nicht was er macht oder wie ich ihn aufrufe. Die Delphi-Hilfi hat da nicht für mich gereicht. Hab jetzt in nem Buch nachgelesen.

ausblenden Delphi-Quelltext
1:
PrintDialog1.Execute;					


HAHA LOL :wink: Da hätte ich auch selbst drauf kommen können. Auch ohne Buch.

Was das Drucken betrifft.
Ich dachte das könnte ich. Jedoch kann ich die Textformatierung nur für jede Zeile einzeln festlegen.
Wenn ich jetzt in einer Zeile unterschiedliche Formatierungen habe, übernimmt er beim Drucken für die gesamte Zeile die Formatierung des ersten Buchstaben in dieser Zeile.

Weiß jemand, wie ich den gesamten Text so drucken kann, wie er im RichEdit steht?

thx

_________________
Two or three tons of stone can really get you down, and keep you there!
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 23.01.06 18:31 
Richedit.Print einfach mal in der Delphi Hilfe nachsehen wie die Parameter dazu heissen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.