By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

A new custom form only shows in my PrintDocument sometimes

P: n/a
If I generate a new form by using Start/Printer and Faxes and then right
click a printer and chose Properties and then generate a new form, my
program then shows the form in PrintDialog (code below) and if selected mPD
then contains the correct sizes.
But if I do almost the same thing using the code below to open the dialog
box and create a new form (rather than selecting the one created as describe
above) , the new size do not appear in mPD
This is true whether I use .PrinterSettings of .Document below
Any suggestions??

Private mPD As New PrintDocument

Dim PD As New PrintDialog

With PD

'Note mPD.PrinterSettings equals(is) mPD.DefaultPageSettings.PrinterSettings

'but mPD.DefaultPageSettings does not equal

'Below, initialize .Document or .PrinterSettings but not both.

'If .PrinterSettings is used the system-wide printer preferences are changed

'If .Document is used changes only effect this app

'comment out for testing .Document = mPD

..PrinterSettings = mPD.PrinterSettings

..ShowHelp = False

..PrinterSettings.Copies = 0

..AllowSomePages = False

..AllowSelection = False

If .ShowDialog() <DialogResult.OK Then Exit Sub

End Width
Nov 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.