代码贴上: System.Drawing.Printing.PrintDocument myPrintDocument = new System.Drawing.Printing.PrintDocument(); myPrintDocument.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.SomePages;
myPrintDialog.Document = myPrintDocument;
myPrintDialog.AllowCurrentPage = true;
myPrintDialog.AllowPrintToFile = true;
myPrintDialog.AllowSelection = true;
myPrintDialog.AllowSomePages = true;
if (myPrintDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
this._textControl.Print(myPrintDocument);
//this._textControl.PrintPreview(myPrintDocument);
}
我想问下:在打印对话框中有“选定范围”打印和“当前页面”打印,也分别试过勾选上了,但是打印出来的文档仍然打印全部内容,达不到想到的效果,是没有这两个功 能还是我代码有问题??
|
|