Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 980437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:22:51+00:00 2026-05-16T04:22:51+00:00

We have a VB6 application that uses the vbprndlg.dll library to show print selection

  • 0

We have a VB6 application that uses the vbprndlg.dll library to show print selection dialogs to the user. Here recently we’ve received reports from users on Windows Vista and 7 (both 32 and 64 bit) stating that the number of copies always stays 1 no matter what they put in the number of copies box on the dialog. When running the exact same code on an XP Pro machine, the number of copies passes like it should to the reporting object.

So far I’ve run tests using both the common dialog control and vbprndlg.dll to raise print dialogs on both a Vista and a 7 computer, and each time the number of copies is always reported to be 1 no matter if I type the number in the box or use the arrow toggle buttons to increase the number of copies. Other properties – such as which printer is selected and the from and to page numbers report correctly.

When I hard code the number of copies to the Crystal Report object (shown below), the correct # of copies print – so this seems more of a problem with the dialog control instead of the Crystal Report object.

Here is a snippet of the code I’m using:

Dim PD As vbprndlglib.PrinterDlg
Set PD = New vbprndlglib.PrinterDlg
''//load default settings
PD.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 PrintDialogFlags.DisablePagesButton Then PD.flags = PD.flags Or
    vbprndlglib.cdlPDNoPageNums
    PD.ShowPrinter (hwnd)
    ''//cr is a reference to a CrystalReport object
    cr.PrinterPort = PD.Port
    cr.PrinterDriver = PD.DriverName
    cr.PrinterName = PD.PrinterName
    cr.CopiesToPrinter = PD.Copies ''//always 1 on Vista/7, correct # on XP
    If PD.flags And vbprndlglib.cdlPDPageNums Then
        cr.PrinterStartPage = PD.FromPage ''// these work fine
        cr.PrinterStopPage = PD.ToPage
    End If
    ''//... 
    cr.Action = 1 ''//prints report
End If

I can’t seem to find any information about known compatibility problems between raising print dialogs in VB6 and Windows Vista/7. Is there anything else I can try with the dialog controls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:22:51+00:00Added an answer on May 16, 2026 at 4:22 am

    The answer popped out at me just as soon as I submitted this question.

    Changing the Flags property of the VBPrnDlg control to include the vbprndlglib.cdlPDUseDevModeCopies flag fixed it, the number of copies works again.

    Hopefully this helps someone stuck in a similar problem!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VB6 application that uses a COM DLL. The DLL is written
I have VB6 application that uses Navigate2 method of WebBrowser control. .Net version of
We have a VB6 application that uses a non-visible window (form) for DDE communication.
I have an old VB6 application that uses an ImageList control from COMCTL32.OCX (Microsoft
We have a legacy VB6 application that uses Crystal Reports XI to generate printed
I have a VB6 application that still references some old VB5 libraries (dll, vbr,
I have a VB6 application that needs to update it's self. For this purpose,
I have a legacy VB6 application that was built using MSDE. As many client's
I have inherited a VB6/Access application that we have developed and sold for many
I have a VB6 application that I am converting to .net. I am doing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.