Solved

Setting printer copies

Posted on 2002-04-10
4
210 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINQ return type for nested group query 6 71
Access 2016 VB code 9 103
passing parameter in sql procedure 9 56
Spell Check in VB6 13 99
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

895 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

14 Experts available now in Live!

Get 1:1 Help Now