Hello all,
I am new to VB.NET but been trying to write a code for PrintDialog as seen below
But been getting PreparedPrintDocument not declared.What could be wrong please?
I am new to VB.NET but been trying to write a code for PrintDialog as seen below
Visual Basic:
Private Sub PrintToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintToolStripMenuItem.DoubleClick
PrintDialog1.Document = PreparePrintDocument()
'PrintDialog1.ShowDialog()
If PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
PrintDialog1.Document.Print()
End If
End Sub
Last edited by a moderator: