473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Problems printing

Hello,
I am writing a application which has a print function. Everything
works fine with the printing function, except for the fact that i
can't seem to get the printing options that I enter in the
printDialog...

private PrintDocument printDoc = new PrintDocument();
private PrintDocument printQualifier = new PrintDocument();
private PageSettings pgSettings = new PageSettings();
private System.Windows.Forms.PrintDialog dlgPrint;
[...]
private void mnuPrint_Click(object sender, System.EventArgs e)
{
printDoc.DefaultPageSettings = pgSettings;
dlgPrint.Document = printDoc;
PrinterSettings settings = new PrinterSettings();
dlgPrint.PrinterSettings = settings;
if (dlgPrint.ShowDialog() == DialogResult.OK)
{
settings = dlgPrint.PrinterSettings;
/*This is my problem. copies will not take the value I
entered in the print dialog*/
int copies = settings.Copies;
printDoc.Print();
}
}

If anyone could help me with this, it would be real appreciated
Thanks a lot
Nov 16 '05 #1
2 1447
Hugo,
There is a "known bug" with Framework 1.0 where this doesn't work. It
works for me in Framework 1.1.
Ron Allen
"Hugo M." <h.********@gmail.com> wrote in message
news:90**************************@posting.google.c om...
Hello,
I am writing a application which has a print function. Everything
works fine with the printing function, except for the fact that i
can't seem to get the printing options that I enter in the
printDialog...

private PrintDocument printDoc = new PrintDocument();
private PrintDocument printQualifier = new PrintDocument();
private PageSettings pgSettings = new PageSettings();
private System.Windows.Forms.PrintDialog dlgPrint;
[...]
private void mnuPrint_Click(object sender, System.EventArgs e)
{
printDoc.DefaultPageSettings = pgSettings;
dlgPrint.Document = printDoc;
PrinterSettings settings = new PrinterSettings();
dlgPrint.PrinterSettings = settings;
if (dlgPrint.ShowDialog() == DialogResult.OK)
{
settings = dlgPrint.PrinterSettings;
/*This is my problem. copies will not take the value I
entered in the print dialog*/
int copies = settings.Copies;
printDoc.Print();
}
}

If anyone could help me with this, it would be real appreciated
Thanks a lot

Nov 16 '05 #2
Hello,
Thank you very much for your reply.
I found microsoft post about that :
http://support.microsoft.com/kb/331134

I could of searched a lot before finding about that...

Thanks again!

Hugo
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Vince | last post by:
I have a generic page that I use for printing content, and it contains an iframe into which I put the url for the page to be printed. I dynamically size the iframe so that it correctly displays...
3
by: Grim Reaper | last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a week. I have been having problems with one thing since I have been printing mailing labels. I print mailing labels by...
1
by: Zeroeffect | last post by:
Hello! I have a database with alot of embedded images. The reason for having the images embedded is security. My problem is that it works fine on my computer, but not on my clients computer....
4
by: Tracey | last post by:
Hey folks, I have an ASP.NET web app that's working just fine, but a small percentage have two printing problems that don't happen to the vast majority of users. These problems are listed below...
1
by: Chad Dittmer via .NET 247 | last post by:
I'm having problems inserting into Sql 2000 using SqlHelper.ExecuteScalar. When it inserts, it only takes the first character from the string?? Any help would be appreciated. Here is the code and...
3
by: Alejandra Parra | last post by:
In my code, I print a dataSet ' get grid's PrintDocument object Dim pd As System.Drawing.Printing.PrintDocument pd = flexgrid.PrintParameters.PrintDocument() ' set up the page (landscape, 1.5"...
11
by: randomtalk | last post by:
hi, i have the following recursive function (simplified to demonstrate the problem): >>> def reTest(bool): .... result = .... if not bool: .... reTest(True) .... else: .... print...
0
by: Galen Somerville | last post by:
In VB6 (converted to VB2005) there are 6 different sub-menu items where the user has a choice of listing items on the screen or printing out a list of items. Each such menu item puts the name of...
1
by: Dreamtime | last post by:
Hi I am using Visual Studio 2005 and the bundled Crystal Reports (previously I used .net 2003 and bundled Crystal Reports for 2 years - same issues!) I have a report which is displayed in the...
3
by: Wilson | last post by:
i am very new to c++ and am creating a new program, below are two seperate parts of the program, made to run seperately, however the constructor in one works (prints "constructing" on the screen),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.