我正在尝试使用 VB.NET PowerPacks PrintForm 打印我的 Windows 窗体。下面是我用来打印表单的代码。当我打印表单时,无论我制作表单的高度多长时间,它都不会填满整个页面,它会在底部留下空间。是否可以让它打印一张完整的 A4 纸而不是只打印 3/4 的页面?
Private Sub printButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.DoubleClick
PrintForm1.Form = Me
'PrintForm1.PrinterSettings.Copies = 1
PrintForm1.PrinterSettings.DefaultPageSettings.Margins = New Printing.Margins(3, 3, 3, 3)
PrintForm1.PrinterSettings.DefaultPageSettings.PaperSize.RawKind = Printing.PaperKind.A4
PrintForm1.PrinterSettings.DefaultPageSettings.Landscape = False
PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
End Sub