PrintDialog help

debeginin

New member
Joined
Nov 24, 2009
Messages
3
Programming Experience
Beginner
I am new to vb.net but wrote this code for a printdialog
VB.NET:
 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
Name 'PreparePrintDocument' not declared
What could be the trouble pleasssssssssssse?
 
Last edited by a moderator:
I believe you are looking at a tutorial somewhere, where they have written up a seperate Class for handling the print events. You need to read the other part of that tutorial.
 
Back
Top