Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Setting printer copies

Posted on 2002-04-10
4
Medium Priority
?
225 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 200 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 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…
Suggested Courses

810 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