Solved

Setting printer copies

Posted on 2002-04-10
4
209 Views
Last Modified: 2010-05-02
I'm allowing the user access to the print common dialog using

dlbCommonDialog.ShowPrinter

After closing the dialog a variable is set to the number of copies selected with the .Copies property.

However, the number of copies selected doesn't clear when the application is closed, so the next time the user runs the app the number of copies is the same as was set in a previous session. In addition, some (not all) other applications, even COTS, pick up this print copy value. I've tried

dlgCommonDialog.Copies = 1

on program load and on program close, but it makes no difference. Even though the .Copies property shows 1 if I put in a break to check, the dialog will still show whatever the previously set number was. Do I need to make an external call to reset the .Copies value when the program closes? Or what?
0
Comment
Question by:rdolivaw
  • 3
4 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 6932507
This is a known bug, check out this article on MSDN:
BUG: nCopies Does Not Initialize the Print Common Dialog Box (Q197393)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q197393

Anthony
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6932519
And here is another article that should help:

PRB: CommonDialog Changes System Wide Printer Properties (Q198712)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q198712

Anthony
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6932525
And finally, when you get a chance please maintain these open questions:

Main form not visible after splash form unloads Date: 10/16/2001 11:21AM PST  
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193933
FormFlow anyone? Date: 12/20/2001 09:00AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=prodappgen&qid=20247993

Anthony
0
 

Author Comment

by:rdolivaw
ID: 6936727
Thanks a lot, Anthony. Since I'm already testing for which OS is on the computer I've just disabled the menu choice for print setup on the W95 boxes on program load. Seems to work ok on the W2K boxes, so that's all right. I'm using Active Reports(tm) for the reporting function, and clicking the Print button on the display window automatically pops up the Print dialog -- this one doesn't have the bug mentioned above, so that's ok, too, and the user can select number of copies there.

Thanks again. I'll take care of the old queries -- EE has been a little recalcitrant of late.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now