Solved

Setting printer copies

Posted on 2002-04-10
4
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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