TMCentral
2011-02-28T21:36:29Z
If I set the Print Landscaper to true (IGPrintManager1.Document.PrinterSettings.DefaultPageSettings.Landscape = True), it does not take effect. It does if I go in and change it in the Printer Setup dialogue UI. How do I make landscape the default? There is no documentation on this I can find. Thanks in advance!
Igor/10Tec
2011-03-01T15:20:37Z
Read what Charles Petzold write in its bestseller "Programming Microsoft Windows with C#":

Quote:

For a new PrintDocument object, the expression

prndoc.PrinterSettings == prndoc.DefaultPageSettings.PrinterSettings 
returns true but
prndoc.DefaultPageSettings == prndoc.PrinterSettings.DefaultPageSettings 
returns false. That's because you may want to change the DefaultPageSettings for the document
without changing the default page settings for the printer.



In iGrid's PrintManager we have the same situation: the Document object-property has its own set of settings after it was created for you by PrintManager. So, to gain the goal you need, you should write this:

IGPrintManager1.Document.DefaultPageSettings.Landscape = True
TMCentral
2011-03-02T00:26:54Z
Terrific - thanks and makes perfect sense when we stopped to think about it! It worked like a charm