怎能笑的私藏(藏什么呀?还没有想好,乱堆!)

                                                                                                        ————怎能笑
在C#中设置打印机纸张大小,如此简单

using System.Drawing.Printing.PrintDocument

using System.Drawing.Printing.PrinterSettings.PaperSizeCollection

using System.Drawing.Printing.PaperSize

using System.Drawing.Printing.PageSettings

/////////需要以上引用

PrintDocument pd = new PrintDocument();
PaperSize p=null;
foreach(PaperSize ps in pd.PrinterSettings.PaperSizes)
{   if(ps.PaperName.Equals("A3"))
  p = ps;
}
pd.DefaultPageSettings.PaperSize = p;
pd.Print();

posted on 2006-09-11 15:09  怎能笑的私藏(藏什么呀?还没有想好,乱堆!)  阅读(4773)  评论(3编辑  收藏  举报