|
-
Jan 14th, 2004, 12:44 PM
#1
Thread Starter
Addicted Member
Print
Why doesn't this code work:
In "Some" event,
PrintDialog1.ShowDialog()
MsgBox(PrintDialog1.PrinterSettings.Copies.ToString)
I always get a "1" in my message box no matter how many copies I choose on the Print Dialog?
Why?
-
Jan 14th, 2004, 03:53 PM
#2
Fanatic Member
I believe the print dialog is modal, so you will hit your messagebox when the user is complete with it (after printing), so you are probably getting the default value.
-
Jan 14th, 2004, 04:02 PM
#3
I'm having the same problem, and no one has been able to help me.
If I set the Copies property to another number before opening the dialog, my number is shown in the dialog ok, but when clicking ok, without making any changes, the property is reset to 1.
I think there may be a bug in the printdialog, but I have not been able to confirm that, neither here or at MSDN.
So if someone knows what to do, I would really like to hear about it.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Jan 14th, 2004, 04:07 PM
#4
Thread Starter
Addicted Member
I was just using a message box to check the value of "Copies", to see what the printer was recieving.
If you have to set the number of copies before you see the dialog, what good is the dialog?
Someone has to know a solution. I can't believe everyone just print one copy of everything.
P.S.
Is it just me or is printing in .net a complete pain in the ***?
-
Jan 15th, 2004, 04:57 AM
#5
Addicted Member
Hi,
I am finding the same problem.
I have a print dialog and no matter what you select in the copies box it is never accessible after the dialog is closed.
I think it must be a bug......
DJ
P.S. I think that printing in .NET is quite easy actually! Not as easy as VB6 (printer.print..... ahhh they were the days) but you do get quite a lot of control which is easier than it was before....
-
Jan 15th, 2004, 05:36 AM
#6
Hole-In-One: Setting the number manually before opening the dialog, was just for testing purposes, but It could be that you wanted a default number of copies other than 1. Either way, the return value is allways 1.
Besides, I don't think it has anything to do with dialog being closed, because the rest of the properties are OK.
Also, I dont see any other way of getting the properties, since the dialog is modal, and we only get control after the dialog is closed.
But you're right that someone must have found a solution for this. At least a lot of people should have experienced this.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Jan 15th, 2004, 09:02 AM
#7
Addicted Member
Hi,
Can you guys let me know what version of the framework you are on? I am thinking that maybe a later version may have this issue solved? I am running version 1.0.3705.
Thanks,
DJ
-
Jan 15th, 2004, 09:48 AM
#8
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Jan 15th, 2004, 10:31 AM
#9
Thread Starter
Addicted Member
Same
There must be a fix?
At least you would hope so!
-
Jan 15th, 2004, 10:58 AM
#10
It is a known issue and should be fixed in the next version of the framework.
-
Jan 15th, 2004, 01:42 PM
#11
Thread Starter
Addicted Member
So The Framework Service Pack 2 dosn't contain the fix?
It should be in Service Pack 3, if I'm understanding you correctly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|