Hi, I was wondering if anybody could help me with printing a displayed form to a printer. This is my current code. (I am using the PrintForm visual basic PowerPack.)

Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click

        cPrintForm.PrintAction = Printing.PrintAction.PrintToPreview
        cPrintForm.Print()

    End Sub

This prints the form fine, but the problem is that the page printed is portrait, and my whole form doesn't fit on it, so I was wondering how to set it to landscape?

Thanks in advance.

This is how you set landscape printing.

Dim settings As New System.Drawing.Printing.PrinterSettings
settings.DefaultPageSettings.Landscape = True
PrintForm1.PrinterSettings = settings
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.