我正在使用PrintDialog
和PrintDocument
控件来打印表单。但是当我单击按钮时,它总是打印一张空纸。我正在使用以下代码:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
PrintDialog1.Document = PrintDocument1
Dim result As DialogResult = PrintDialog1.ShowDialog
If (result = DialogResult.OK) Then
PrintDocument1.Print()
End If
End Sub