Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Creating a Print Preview of a Form

$
0
0
Hi all.
I need help please with creating a print PREVIEW of a form and then while looking at the preview there must be a button on the preview to print

the current Coding that i have, does not display any preview:

Dim psd As New PageSetupDialog

        Dim pd As New Printing.PrintDocument

        psd.Document = pd

        If psd.ShowDialog = Windows.Forms.DialogResult.OK Then

            PrintForm1.PrinterSettings = psd.PrinterSettings

            PrintForm1.PrinterSettings.DefaultPageSettings.PaperSize = psd.PrinterSettings.DefaultPageSettings.PaperSize

            If PrintForm1.PrinterSettings.IsValid Then

                PrintForm1.Print()

            End If

        End If

    End Sub



Can someone please help me fix this?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>