English
Forum

Druckauswahldialog, aray, Print, type

 
- Page 1 -



Julian
Schmidt
Hey people,
Why druckt the View source the aray not from?
How can I moreover whom Text another type give (About UseFont goes it unfortunately not)?
 $H windows.ph
Def @ChoosePrinter(1) !"COMDLG32.DLL", "PrintDlgA"
Declare DOCINFO#, Text$[]
Struct DOCINFO = cbSize&,lpszDocName&,lpszOutput&,lpszDatatype&,fwType&
Dim DOCINFO#, DOCINFO
Declare PRINTDLG#
Struct PRINTDLG = lStructSize&,hWndOwner&,hDevMode&,hDevNames&,hDC&,Flags&,nFromPage%,nToPage%,nMinPage%,nMaxPage%,nCopies%,hInstance&,lCustData&,lpfnPrintHook&,lpfnSetupHook&,lpPrintTemplateName&,lpPrintSetupTemplateName&,hPrintTemplate&,hSetupTemplate&
Dim PRINTDLG#, PRINTDLG
Def &PD_RETURNDC $100
Declare PrintText$, DocName$
DocName$ = "Array Ausdrucken"

With DOCINFO#

    .cbSize& = @SizeOf(DOCINFO#)
    .lpszDocName& = @Addr(DocName$)
    .lpszOutput& = 0

EndWith

With PRINTDLG#

    .lStructSize& = @SizeOf(PRINTDLG#)
    .hWndOwner& = %hWnd
    .hDevMode& = 0
    .Flags& = &PD_RETURNDC
    .hDevNames& = 0
    .hInstance& = %hInstance
    .lpfnPrintHook& = 0
    .lpfnSetupHook& = 0
    .lpPrintTemplateName& = 0
    .lpPrintSetupTemplateName& = 0

EndWith

@ChoosePrinter(PRINTDLG#)
PrintText$ ="Beispiel - Print Array"

whileloop 14

    Text$[&loop]="TestArray" + Str $(&loop)

Endwhile

var y%=140
~StartDoc(PRINTDLG#.hDC&, DOCINFO#)
~StartPage(PRINTDLG#.hDC&)
'UseFont "Times New Roman",26,0,1,0,1
~TextOut(PRINTDLG#.hDC&, 150, 150, @Addr(PrintText$),@Len(PrintText$))'whom Text druckt it
'UseFont "Times New Roman",22,0,0,1,0,0

whileloop 14

    ~TextOut(PRINTDLG#.hDC&, 80, y%, Text$[&loop],@Len(text $[&loop]))'the aray druckt it not ;(
    y%=y%+50

Endwhile

~EndPage(PRINTDLG#.hDC&)
~EndDoc(PRINTDLG#.hDC&)
Dispose DOCINFO#
Dispose PRINTDLG#

LG

Julian57
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/14/11  
 



« this Posting watts as Solution marked. »


Thomas
Freier
middle-aged Posting deleted. to the Escape sequences Search on the Web. but The help with whom present Printers well neither moreover, because It's all right indeed so:
 $H windows.ph
Def @ChoosePrinter(1) !"COMDLG32.DLL", "PrintDlgA"
Declare DOCINFO#, Text$[]
Struct DOCINFO = cbSize&,lpszDocName&,lpszOutput&,lpszDatatype&,fwType&
Dim DOCINFO#, DOCINFO
Declare PRINTDLG#
Struct PRINTDLG = lStructSize&,hWndOwner&,hDevMode&,hDevNames&,hDC&,Flags&,nFromPage%,nToPage%,nMinPage%,nMaxPage%,nCopies%,hInstance&,lCustData&,lpfnPrintHook&,lpfnSetupHook&,lpPrintTemplateName&,lpPrintSetupTemplateName&,hPrintTemplate&,hSetupTemplate&
Dim PRINTDLG#, PRINTDLG
Def &PD_RETURNDC $100
Declare PrintText$, DocName$
DocName$ = "Array Ausdrucken"

With DOCINFO#

    .cbSize& = @SizeOf(DOCINFO#)
    .lpszDocName& = @Addr(DocName$)
    .lpszOutput& = 0

EndWith

With PRINTDLG#

    .lStructSize& = @SizeOf(PRINTDLG#)
    .hWndOwner& = %hWnd
    .hDevMode& = 0
    .Flags& = &PD_RETURNDC
    .hDevNames& = 0
    .hInstance& = %hInstance
    .lpfnPrintHook& = 0
    .lpfnSetupHook& = 0
    .lpPrintTemplateName& = 0
    .lpPrintSetupTemplateName& = 0

EndWith

@ChoosePrinter(PRINTDLG#)
PrintText$ ="Beispiel - Print Array"

whileloop 14

    Text$[&loop]="TestArray" + Str $(&loop)

Endwhile

~StartDoc(PRINTDLG#.hDC&, DOCINFO#)
~StartPage(PRINTDLG#.hDC&)
'see Help "Drucken"
StartPaint PRINTDLG#.hDC&
UseFont "Times New Roman",(24.0*3.7),0,1,0,1
EndPaint PRINTDLG#.hDC&
~TextOut(PRINTDLG#.hDC&, (15*3.7), (15*3.7), @Addr(PrintText$),@Len(PrintText$))
StartPaint PRINTDLG#.hDC&
UseFont "Arial",(16.0*3.7),0,0,0,0,0
EndPaint DC&
declare Text$
var y%=50

whileloop 14

    Text$=text $[&loop]
    ~TextOut(PRINTDLG#.hDC&, (15*3.7), (y%*3.7), @Addr(Text$),@Len(Text$))
    y%=y%+18

Endwhile

~EndPage(PRINTDLG#.hDC&)
~EndDoc(PRINTDLG#.hDC&)
Dispose DOCINFO#
Dispose PRINTDLG#

About whom factor Bildschirmpunkt to that Druckerpunkt become You here too yet something find.
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/15/11  
 




Thomas
Freier
means print went already, if You inside the Loop whom equal commands absetzt.
 $H windows.ph
Def @ChoosePrinter(1) !"COMDLG32.DLL", "PrintDlgA"
Declare DOCINFO#, Text$[]
Struct DOCINFO = cbSize&,lpszDocName&,lpszOutput&,lpszDatatype&,fwType&
Dim DOCINFO#, DOCINFO
Declare PRINTDLG#
Struct PRINTDLG = lStructSize&,hWndOwner&,hDevMode&,hDevNames&,hDC&,Flags&,nFromPage%,nToPage%,nMinPage%,nMaxPage%,nCopies%,hInstance&,lCustData&,lpfnPrintHook&,lpfnSetupHook&,lpPrintTemplateName&,lpPrintSetupTemplateName&,hPrintTemplate&,hSetupTemplate&
Dim PRINTDLG#, PRINTDLG
Def &PD_RETURNDC $100
Declare PrintText$, DocName$
DocName$ = "Array Ausdrucken"

With DOCINFO#

    .cbSize& = @SizeOf(DOCINFO#)
    .lpszDocName& = @Addr(DocName$)
    .lpszOutput& = 0

EndWith

With PRINTDLG#

    .lStructSize& = @SizeOf(PRINTDLG#)
    .hWndOwner& = %hWnd
    .hDevMode& = 0
    .Flags& = &PD_RETURNDC
    .hDevNames& = 0
    .hInstance& = %hInstance
    .lpfnPrintHook& = 0
    .lpfnSetupHook& = 0
    .lpPrintTemplateName& = 0
    .lpPrintSetupTemplateName& = 0

EndWith

@ChoosePrinter(PRINTDLG#)
PrintText$ ="Beispiel - Print Array"

whileloop 14

    Text$[&loop]="TestArray" + Str $(&loop)

Endwhile

var y%=140
~StartDoc(PRINTDLG#.hDC&, DOCINFO#)
~StartPage(PRINTDLG#.hDC&)
'UseFont "Times New Roman",26,0,1,0,1
~TextOut(PRINTDLG#.hDC&, 150, 150, @Addr(PrintText$),@Len(PrintText$))'whom Text druckt it
'UseFont "Times New Roman",22,0,0,1,0,0
declare Text$
y%=300

whileloop 14

    Text$=text $[&loop]
    ~TextOut(PRINTDLG#.hDC&, 150, y%, @Addr(Text$),@Len(Text$))
    y%=y%+150

Endwhile

~EndPage(PRINTDLG#.hDC&)
~EndDoc(PRINTDLG#.hDC&)
Dispose DOCINFO#
Dispose PRINTDLG#

there You not between Startprint and Endprint druckst, can the Font presumably only through Send the suitable Escape-Sequenzen umgestellt go.
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/14/11  
 




Julian
Schmidt
How Dou you mean with the the Escape-sequence?
One example?
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/14/11  
 




Thomas
Freier
middle-aged Posting deleted. to the Escape sequences Search on the Web. but The help with whom present Printers well neither moreover, because It's all right indeed so:
 $H windows.ph
Def @ChoosePrinter(1) !"COMDLG32.DLL", "PrintDlgA"
Declare DOCINFO#, Text$[]
Struct DOCINFO = cbSize&,lpszDocName&,lpszOutput&,lpszDatatype&,fwType&
Dim DOCINFO#, DOCINFO
Declare PRINTDLG#
Struct PRINTDLG = lStructSize&,hWndOwner&,hDevMode&,hDevNames&,hDC&,Flags&,nFromPage%,nToPage%,nMinPage%,nMaxPage%,nCopies%,hInstance&,lCustData&,lpfnPrintHook&,lpfnSetupHook&,lpPrintTemplateName&,lpPrintSetupTemplateName&,hPrintTemplate&,hSetupTemplate&
Dim PRINTDLG#, PRINTDLG
Def &PD_RETURNDC $100
Declare PrintText$, DocName$
DocName$ = "Array Ausdrucken"

With DOCINFO#

    .cbSize& = @SizeOf(DOCINFO#)
    .lpszDocName& = @Addr(DocName$)
    .lpszOutput& = 0

EndWith

With PRINTDLG#

    .lStructSize& = @SizeOf(PRINTDLG#)
    .hWndOwner& = %hWnd
    .hDevMode& = 0
    .Flags& = &PD_RETURNDC
    .hDevNames& = 0
    .hInstance& = %hInstance
    .lpfnPrintHook& = 0
    .lpfnSetupHook& = 0
    .lpPrintTemplateName& = 0
    .lpPrintSetupTemplateName& = 0

EndWith

@ChoosePrinter(PRINTDLG#)
PrintText$ ="Beispiel - Print Array"

whileloop 14

    Text$[&loop]="TestArray" + Str $(&loop)

Endwhile

~StartDoc(PRINTDLG#.hDC&, DOCINFO#)
~StartPage(PRINTDLG#.hDC&)
'see Help "Drucken"
StartPaint PRINTDLG#.hDC&
UseFont "Times New Roman",(24.0*3.7),0,1,0,1
EndPaint PRINTDLG#.hDC&
~TextOut(PRINTDLG#.hDC&, (15*3.7), (15*3.7), @Addr(PrintText$),@Len(PrintText$))
StartPaint PRINTDLG#.hDC&
UseFont "Arial",(16.0*3.7),0,0,0,0,0
EndPaint DC&
declare Text$
var y%=50

whileloop 14

    Text$=text $[&loop]
    ~TextOut(PRINTDLG#.hDC&, (15*3.7), (y%*3.7), @Addr(Text$),@Len(Text$))
    y%=y%+18

Endwhile

~EndPage(PRINTDLG#.hDC&)
~EndDoc(PRINTDLG#.hDC&)
Dispose DOCINFO#
Dispose PRINTDLG#

About whom factor Bildschirmpunkt to that Druckerpunkt become You here too yet something find.
 
Gruß Thomas
Windows XP SP2, XProfan X2
06/15/11  
 




Julian
Schmidt
thanks for your Help, and particularly The good Examples
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/15/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.167 Views

Untitledvor 0 min.
kustg05/14/19
Sebald Grandjean02/09/18
GDL03/26/16
rquindt08/02/15
More...

Themeninformationen

this Topic has 2 subscriber:

Julian Schmidt (3x)
Thomas Freier (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie