vb6 - Number of copies never passing from print dialog, always 1 -
We use a VB6 application that vbprndlg.dll
to print selection dialog Library user to show Here we have recently received a report from users on Windows Vista and 7 (both 32 and 64 bit), which states that the number of copies is always 1, it does not matter if they are copies on the dialog box What do the numbers put in When the exact same code is running on an XP Pro machine, the number of copies passes through the reporting object.
So far I have run a test using both the normal communication control and vbprndlg .dll
to increase the print dialog on both Vista and 7 computers, and every time the number of copies Always be reported to be 1, if I type the number in the box or use the button to increase the arrow buttons. Number of copies other properties - such as which printer is selected and from page number Or report correctly
When I work hard on the number of copies of the crystal report object (shown below), then correct copies of print # - so this dialog instead of crystal report object Looks more of a problem with the control.
piece .PrinterName = Printer.DeviceName PD.DriverName = Printer.DriverName PD.Port = Printer.Port PD.PaperBin = Printer.PaperBin PD.CancelError = true PD.Min = 1 PD.Max = 32767 PD.flags = (vbprndlglib .cdlPDNoSelection or vbprndlglib.cdlPDHidePrintToFile) If printflags and printedLogfags.Disge Page Button then PD.flags = PD.flags or vbprndlglib.cdlPDNoPageNums PD.ShowPrinter (hwnd) '' // cr a CrystalReport object cr.PrinterPort = PD.Port cr PrinterDriver = PD.DriverName cr.PrinterName = PD.PrinterName cr.CopiesToPrinter = P D.Copies' '// Always on Vista / 7, right at 1 PD.flags and vbprndlglib.cdlPDPageNums then cr.PrinterStartPage = PD.FromPage' '// These fine cr.PrinterStopPage work = PD.ToPage end if' If '// ... cr.Action = 1' '// print reports end if
I VB 6 and about known compatibility issues to enhance the print dialog in Windows Vista / 7 No information was found in. Is there something else I can try with dialogue controls?
The answer to this question came as soon as I came
Change flag
vbprndlglib.cdlPDUseDevModeCopies
flag, fixed number of copies again Works.
Hope that anyone gets trapped in such a problem!
Comments
Post a Comment