DeFine Type

BBarber

New member
Joined
Mar 24, 2008
Messages
4
Programming Experience
Beginner
This is a print thingy that i found on here somewhere. My problem is defining the type. It tells me that PrintDocument...Type is not defined...could someone help me with this....Thanks in advance

I Have this
VB.NET:
  Private WithEvents m_PrintDocument As PrintDocument

 ' Print the picture.
    Private Sub btnPrint_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles BtnPrint.Click
        ' Copy the form's image into a bitmap.
        m_PrintBitmap = GetDecoratedFormImage()

        ' Make a PrintDocument and print.
        m_PrintDocument = New PrintDocument
        m_PrintDocument.Print()
    End Sub
 
Last edited by a moderator:
PrintDocument is from System.Drawing.Printing namespace, just check with documentation. Since a .Net 1.1 winforms project has System.Drawing namespace imported by default you can just qualify it by writing "Printing.PrintDocument". You can of course also import the whole System.Drawing.Printing namespace, especially if you are using much stuff from there. Did you know you can drag a Printdocument instance onto form from the Toolbox?
 
Back
Top