知道了,应该是打印作业完毕后清楚
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try printpagesettings = New PageSettings printpagesettings.PaperSize = New System.Drawing.Printing.PaperSize("自定义大小", 827, 1169) printpagesettings.Landscape = True printpagesettings.Margins.Left = 1 '以百分之一英寸为单位,这是设置打印的左边距 '.....右边距,上、下 PrintDocument1.DefaultPageSettings = printpagesettings stringtoprint = RichTextBox2.Text PrintDialog1.Document = PrintDocument1 PrintDialog1.PrinterSettings.Copies = 1 ''打印的份数 If PrintDialog1.ShowDialog = DialogResult.OK Then AddHandler PrintDocument1.PrintPage, AddressOf Me.printgraphicYDxukezheng '打印的精准度就靠你在这个过程里设置了 PrintDocument1.Print() PrintDocument1.Dispose() RemoveHandler PrintDocument1.PrintPage, AddressOf Me.printgraphicYDxukezheng End If Catch ex As Exception MessageBox.Show("打印出现错误", ex.ToString()) End Try End Sub