| |
|
|
GC57 | The erweiterte function DrawText: DrawText x%, y%, dx%, dy%, Text$, stature% functions fine.
but what make I if I in the Landscape print wants? the stature% (2) druckt still rechtbuendig; what in the Landscape (Orientation 900) bedeutet; the the Text wieter under printed becomes.
gives it there a Loesung? Vielen Thanks beforehand. |
|
|
| |
|
|
|
| Perhaps. helps you... CompileMarkSeparation'URL: https://xprofan.com/intl/de/quelltexte/druckausgabe-querformat/
'XProfan Querformat - Druckausgabe von Andreas Miethe
'##################
$H windows.ph
DEF Get_STDPrinter(1) Substr$(ReadIni$("WIN.INI","Windows","Device"),@&(1),",")
DEF OpenPrinter(3) !"WINSPOOL.DRV","OpenPrinterA"
DEF ClosePrinter(1) !"WINSPOOL.DRV","ClosePrinter"
DEF DocumentProperties(6) ! "WINSPOOL.DRV","DocumentPropertiesA"
CLS
Declare STDPrinterName$
STDPrinterName$ = Get_STDPrinter(1)'name des Standard-Druckers ermitteln
Declare PrinterHandle&
OpenPrinter(Addr(STDPrinterName$),Addr(PrinterHandle&),0)'PrinterHandle ermitteln
Declare BufferSize&,DevIn#
BufferSize& = DocumentProperties(%hwnd,PrinterHandle&,Addr(STDPrinterName$),0,0,0)'Buffergroes se fuer Devmode-Struktur ermitteln
Dim DevIn#,BufferSize&
DocumentProperties(0,PrinterHandle&,Addr(STDPrinterName$),DevIn#,0,$13)'Devmode- Struktur fuellen
ClosePrinter(PrinterHandle&)'Printerhandle wird nicht mehr benoetigt
Declare PrinterDC&
Long DevIn#,44 = 2'Orientation auf Querdruck setzen
PrinterDC& = ~CreateDC("WINSPOOL",Addr(STDPrinterName$),0,DevIn#)'Drucke-Device-Context
'Docinfo-Struktur anlegen und fuellen
Declare DocInf#,Docname$
Dim DocInf#,12
Long DocInf#,0 = 12
Docname$ = "Mein Dokument"
Long DocInf#,4 = Addr(Docname$)
Long DocInf#,8 = 0
'Druckausgabe per API
If ~StartDoc(PrinterDC&,DocInf#) > 0
If ~StartPage(PrinterDC&) > 0
printDaZeugs(printerDC&)
//~TextOut(PrinterDC&,60,70,"Querdruck",9)
~EndPage(PrinterDC&)
~EndDoc(PrinterDC&)
Endif
Endif
Print "Fertig mit drucken"
waitinput
Dispose DevIn#
Dispose DocInf#
END
proc printDaZeugs
parameters dc&
var maxx&=~GetDeviceCaps(dc&,~HORZRES)
var maxy&=~GetDeviceCaps(dc&,~VERTRES)
startPaint dc&
usepen 0,0,$FF0000
useBrush 1,$00FF00
rectangle 0,0 - maxx&,maxy&
endPaint
./../Function-References/XProfan/endproc/'>endProc
... Have an example of Andreas Miethe something adjusted
... Try your DrawText time into function printDaZeugs to take off. |
|
|
| |
|
|
|
GC57 | thanks fuer the Info.
I Have the time attempts. wars but always a vain Page if I DrawText einbinde. |
|
|
| |
|
|
|
| Jo, by me GEHTS.
Zeigste hold time whom code. |
|
|
| |
|
|
|
| Zeig still time your Sourcecode -
can Yes otherwise not so well help. |
|
|
| |
|
|
|
GC57 | CompileMarkSeparationCLS
'Beispiel
'Normal Format Correct
UseFont "Arial",12,0,0,0,0
DrawText 100,100,300,120,"LINKS",0
DrawText 100,120,300,140,"RECHTS",2
WAITINPUT
'Beispiel
'Querformat
@Set("Orientation",900)
UseFont "Arial",12,0,0,0,0
DrawText 100,300,120,100,"LINKS",0
DrawText 120,300,140,100,"RECHTS",2
PUT
here time one small example: Fuer whom pressure can StartPrint and Endprint eingefuegt werden; is fuer The function not important. the happens too in the Bildschirmausgabe.
thanks over again. |
|
|
| |
|
|
|
| can The wide self subtrahieren: [...] |
|
|
| |
|
|
|
| iF;Das sees interestingly from!
though wars so did i not in the Landscape there. it shining the The Zeichengroesse somehow differently is.
but I Games domit another little More rum.
thanks over again. |
|
|
| |
|
|