Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Saving and Restoring a printer

58 views
Skip to first unread message

Mark Clement

unread,
Aug 2, 2021, 4:48:34 AM8/2/21
to
If any of the properties of a printer are changed they are kept until the program is closed.

What i wish to do is store the printer properties

Allow the user to change then

Restore the printer properties

I use Report Pro 2.14 and VO28. If anyone has a better suggestion to keep the printer properties please let me know.

dlzc

unread,
Aug 2, 2021, 10:10:37 AM8/2/21
to
Win32 has an interface, to access / change the printer device properties via the Windows interface:
https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-printer

Could you read it, store it, let the user go to town, then reset it? I don't know how VO "wraps" this interface.

David A. Smith

Jamal

unread,
Aug 2, 2021, 11:33:18 PM8/2/21
to
Look at the The PtrDevice (Printer Device) class in RP developer's help
file. It may help you figure it out.

It has the following:

Properties (some are ACCESS, some are ACCESS/ASSIGN):

AllPages
BottomMargin
CollateCopies
Color
Copies
CurrentPageNumber
DefaultPaperSource
DeviceContext
DeviceModeFields
DisablePrint2File
Duplex
ExportObject
FromPage
HidePrint2File
HPixelsPerInch
InPreview
InPrint
IsValid
Landscape
LeftMargin
LogPaperLength
LogPaperWidth
LogPixelsPerInchX
LogPixelsPerInchY
LogPrintAreaLength
LogPrintAreaWidth
MaxPage
MinPage
NoPageNums
NoSelection
PageNums
PaperLength
PaperLengthInches
PaperSize
PaperWidth
PaperWidthInches
Print2File
PrintDlgFlags
PrinterDeviceContext
PrinterDriver
PrinterName
PrinterPort
PrintQuality
PrintWindow
PromptForFile
PromptForPrintDlg
Quit
RightMargin
Selection
ToPage
TopMargin
VPixelsPerInch
XPrinterRes
YPrinterRes

Methods:

CreatePrinterDC
CreatePrinterIC
GetPaperBins
GetPaperSizes
PrintPreview
QuitPreview
SetPrinterByName
0 new messages