Documentation component by D.Glodt (c)2000-2002 |
Appendix A: QPageSetup |
|
QPageSetup Component
-
INCLUDED IN RAPIDQ2.INC
QPageSetup is a printer dialog box with other additions. If you have
RapidQ2.inc then the
Caption property should work with another WndProc command, otherwise don't use
the
Caption property.
QPageSetup Properties
Field |
Type |
R/W |
Défault |
|
|
|
|
|
Collate |
BOOLEAN |
R/W |
False |
Copies |
SHORT |
R/W |
0 |
DefaultSource |
SHORT |
R/W |
0 |
DisablePrinter |
BOOLEAN |
R/W |
False |
|
Printer configuration. |
|
|
|
DisablePaper |
BOOLEAN |
R/W |
False |
|
Choice of paper. |
|
|
|
DisableOrient |
BOOLEAN |
R/W |
False |
|
Selection paper orientation. |
|
|
|
DisableMargins |
BOOLEAN |
R/W |
False |
|
Margins paper |
|
|
|
Duplex |
SHORT |
R/W |
False |
Orinetation |
BOOLEAN |
R |
FALSE |
|
Orientation paper ,Portrait = 1 and Landscape = 2
(Note PRINTER works with Portrait = 0 and Landscape =1) |
|
|
|
MarginLeft |
LONG |
R/W |
0 |
|
Margin left in mm |
|
|
|
MarginTop |
LONG |
R/W |
0 |
|
Margin top in mm |
|
|
|
MarginRight |
LONG |
R/W |
0 |
|
Margin right in mm |
|
|
MarginBottom |
LONG |
R/W |
0 |
|
|
Margin bottom in mm |
|
|
|
PageWidth |
LONG |
R |
|
|
|
Page width in mm |
|
|
|
PageHeight |
LONG |
R |
|
|
|
Page height in mm |
|
|
|
PrintColor |
SHORT |
R |
|
|
|
Printing in color or greyscale |
|
|
|
PrintQuality |
LONG |
R |
|
|
Caption |
STRING |
RW |
|
|
|
Title dialog box |
|
|
|
QPageSetup Methods
Method |
Type |
Description |
Params |
|
|
|
|
|
Execute |
SUB |
Show printer dialog box |
|
QPageSetup Events
Event |
Type |
Occurs when... |
Params |
|
|
|
|
|
QPageSetup Examples
$INCLUDE < Rapidq2.INC >
'paper selections
CONST DMPAPER_LETTER = 1
CONST DMPAPER_FIRST = DMPAPER_LETTER 'Letter 8 1/2 x 11 in
CONST DMPAPER_LETTERSMALL = 2 'Letter Small 8 1/2 x 11 in
CONST DMPAPER_TABLOID = 3 'Tabloid 11 x 17 in
CONST DMPAPER_LEDGER = 4 'Ledger 17 x 11 in
CONST DMPAPER_LEGAL = 5 'Legal 8 1/2 x 14 in
CONST DMPAPER_STATEMENT = 6 'Statement 5 1/2 x 8 1/2in
CONST DMPAPER_EXECUTIVE = 7 'Executive 7 1/4 x 10 1/2in
CONST DMPAPER_A3 = 8 'A3 297 x 420 mm
CONST DMPAPER_A4 = 9 'A4 210 x 297 mm
CONST DMPAPER_A4SMALL = 10 'A4 Small 210 x 297 mm
CONST DMPAPER_A5 = 11 'A5 148 x 210 mm
CONST DMPAPER_B4 = 12 'B4 250 x 354
CONST DMPAPER_B5 = 13 'B5 182 x 257 mm
CONST DMPAPER_FOLIO = 14 'Folio 8 1/2 x 13 in
CONST DMPAPER_QUARTO = 15 'Quarto 215 x 275 mm
CONST DMPAPER_10X14 = 16 '10x14 in
CONST DMPAPER_11X17 = 17 '11x17 in
CONST DMPAPER_NOTE = 18 'Note 8 1/2 x 11 in
CONST DMPAPER_ENV_9 = 19 'Envelope #9 3 7/8 x 8 7/8
CONST DMPAPER_ENV_10 = 20 'Envelope #10 4 1/8 x 9 1/2
CONST DMPAPER_ENV_11 = 21 'Envelope #11 4 1/2 x 10 3/8
CONST DMPAPER_ENV_12 = 22 'Envelope #12 4 \276 x 11
CONST DMPAPER_ENV_14 = 23 'Envelope #14 5 x 11 1/2
CONST DMPAPER_CSHEET = 24 'C size sheet
CONST DMPAPER_DSHEET = 25 'D size sheet
CONST DMPAPER_ESHEET = 26 'E size sheet
CONST DMPAPER_ENV_DL = 27 'Envelope DL 110 x 220mm
CONST DMPAPER_ENV_C5 = 28 'Envelope C5 162 x 229 mm
CONST DMPAPER_ENV_C3 = 29 'Envelope C3 324 x 458 mm
CONST DMPAPER_ENV_C4 = 30 'Envelope C4 229 x 324 mm
CONST DMPAPER_ENV_C6 = 31 'Envelope C6 114 x 162 mm
CONST DMPAPER_ENV_C65 = 32 'Envelope C65 114 x 229 mm
CONST DMPAPER_ENV_B4 = 33 'Envelope B4 250 x 353 mm
CONST DMPAPER_ENV_B5 = 34 'Envelope B5 176 x 250 mm
CONST DMPAPER_ENV_B6 = 35 'Envelope B6 176 x 125 mm
CONST DMPAPER_ENV_ITALY = 36 'Envelope 110 x 230 mm
CONST DMPAPER_ENV_MONARCH = 37 'Envelope Monarch 3.875 x7.5 in
CONST DMPAPER_ENV_PERSONAL = 38 '6 3/4 Envelope 3 5/8 x 6 1/2 in
CONST DMPAPER_FANFOLD_US = 39 'US Std Fanfold 14 7/8 x 11 in
CONST DMPAPER_FANFOLD_STD_GERMAN = 40 'German Std Fanfold 8 1/2 x 12 in
CONST DMPAPER_FANFOLD_LGL_GERMAN = 41 'German Legal Fanfold 8 1/2 x 13 in
'Constants for dmPrintQuality
CONST DMRES_DRAFT = (- 1)
CONST DMRES_HIGH = (- 4)
CONST DMRES_LOW = (- 2)
CONST DMRES_MEDIUM = (- 3)
'Constants for dmTTOption
CONST DMTT_BITMAP = 1
CONST DMTT_DOWNLOAD = 2
CONST DMTT_DOWNLOAD_OUTLINE = 4
CONST DMTT_SUBDEV = 3
'Constants for dmColor
CONST DMCOLOR_COLOR = 2
CONST DMCOLOR_MONOCHROME = 1
'Constants for dmCollate
CONST DMCOLLATE_FALSE = 0
CONST DMCOLLATE_TRUE = 1
CONST DM_COLLATE AS LONG = &H8000
'Constants for dmDuplex
CONST DM_DUPLEX = &H1000
CONST DMDUP_HORIZONTAL = 3
CONST DMDUP_SIMPLEX = 1
CONST DMDUP_VERTICAL = 2
DIM MyPrinter AS QPageSetup
MyPrinter.PageWidth = 297
MyPrinter.PageHeight = 420
MyPrinter.PaperSize = 11
MyPrinter.MarginLeft = 10
MyPrinter.MarginRight = 10
MyPrinter.MarginTop = 10
MyPrinter.MarginBottom = 10
MyPrinter.Orientation = 2
MyPrinter.Duplex = 2
MyPrinter.Copies = 45
MyPrinter.DefaultSource = 0
MyPrinter.Collate = 1
MyPrinter.psd.rtMinMarginRight = 8
MyPrinter.PrintColor = 2
MyPrinter.PrintQuality = - 1
MyPrinter.Execute
PRINT "Structure actuelle"
PRINT "------------------"
PRINT "PaperSize = " & STR$(MyPrinter.PaperSize)
PRINT "PaperSizeX = " & STR$(MyPrinter.PageWidth)
PRINT "ptPaperSizeY = " & STR$(MyPrinter.PageHeight)
PRINT "rtMarginLeft = " & STR$(MyPrinter.MarginLeft)
PRINT "rtMarginTop = " & STR$(MyPrinter.MarginTop)
PRINT "rtMarginRight = " & STR$(MyPrinter.MarginRight)
PRINT "rtMarginBottom = " & STR$(MyPrinter.MarginBottom)
PRINT "Orientation = " & STR$(MyPrinter.Orientation)
PRINT "Duplex = " STR$(MyPrinter.Duplex)
PRINT "Copies = " & STR$(printer.Copies)
PRINT "DefaultSource = " & STR$(MyPrinter.DefaultSource)
PRINT "Collate = " & STR$(MyPrinter.Collate)
PRINT "Color = " & STR$(MyPrinter.PrintColor)
PRINT "PrintQuality = " & STR$(MyPrinter.PrintQuality)
PRINT "--------------------------------"
PRINT "rtMinMarginLeft = " & STR$(MyPrinter.psd.rtminMarginLeft)
PRINT "rtMinMarginTop = " & STR$(MyPrinter.psd.rtMinMarginTop)
PRINT "rtMinMarginRight = " & STR$(MyPrinter.psd.rtMinMarginRight)
PRINT "rtMinMarginBottom = " & STR$(MyPrinter.psd.rtMinMarginBottom)
SLEEP 1000