PrintDialog help

debeginin

Newcomer
Joined
Nov 24, 2009
Messages
1
Hello all,
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
But been getting PreparedPrintDocument not declared.What could be wrong please?
 
Last edited by a moderator:
Back
Top