我在表单Form1上有一个按钮btnPrint,我希望在点击btnPrint时打印该表单。
答案 0 :(得分:0)
从ToolBox
添加PrintForm工具在打印按钮中......
Try
PrintForm1.Form.AutoSize = True
PrintForm1.Form.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
Catch ex As Exception
End Try