• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

.Net Printing - Limiting Orientation and Paper Size options in print dialog

I have a small C# Windows app that should limit users to always printing in "Portrait" orientation with a paper size of 8.5/11.

My question is what is the best way to do this?

1. Is it possible to disable the Landscape option that displays on the Print - Properties page?
2. Is it possible to limit the Paper Size options that display on the Print - Properties page to 8.5/11? (right now it displays A4, A5, B5, DL Envelope, etc...none of which would be supported by this app).

I realize this is the VB.Net topic area but I have posted this question to the C# area and have no replies yet so I was wondering if any VB.Net developers have some info. on this.

Thanks for your time,
0
FlamingTrousers
Asked:
FlamingTrousers
2 Solutions
 
arif_eqbalCommented:
Well i do not know if you can limit the display of these options but yes you can check if the values set by the user is valid for your case or not. i.e. when the user interacts with the Dialog box sets the Orientation values etc. and clicks Print at that time you can check the values validate it and if it is not proper you can show a message and reopen the Dialog box. That will not be very approppriate though but if it suits you fine..
0
 
123654789987Commented:
U can use the code as explained here to always print in potrait. It also gives the methods for defining the size of the page

http://www.vb-helper.com/howto_net_print_landscape.html
0
 
FlamingTrousersAuthor Commented:
OK. Thanks for the input!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now