【发布时间】:2019-12-20 17:32:50
【问题描述】:
当我通过PrintPage 方法将PrintDocument 对象设置为横向时
e.PageSettings.landscape=True。如果我将它发送到打印机,它工作正常。
但是在PrintPreviewControl 上,它仍然是纵向的。我找不到直接在PrintPreviewControl 中更改页面大小或方向的方法。我尝试设置PrintDocument.DefaultPageSettings.Landscape = true,但这也无济于事。
Private Sub pDocument_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles pDocument.PrintPage
Select Case QueryRep.ReportStyle ' only have one report style, reserved for custom reporting for each customer.
Case 0 ' standard report format
StandardReport(e)
End Select
' isLandscape is a public variable set by the standardReport() sub
e.PageSettings.Landscape = isLandscape
End Sub
【问题讨论】:
-
更多信息,如果我在设置 ppcontrol.document=pdocument 之前设置为横向,它会起作用,但如果在此之后设置它不会调整。有没有办法刷新 ppcontrol ?