这是示例程序中的代码,打印出来仍然是全部的页面
Private Sub WithoutDialogToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WithoutDialogToolStripMenuItem.Click
Dim myPrintDocument As New System.Drawing.Printing.PrintDocument
myPrintDocument.PrinterSettings.FromPage = 1
myPrintDocument.PrinterSettings.ToPage = 1
TextControl1.Print(myPrintDocument)
End Sub |