Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27159

VS 2010 Printing contents in a form

$
0
0
Hi. I need some help in printing contents in a form, screenshot attached. I tried using the below code but it gives me a blank document. I think theres something I'm supposed to add under document1.beginprint or something.. Please advice...
Code:

    Private Sub btnPrint_Click(sender As System.Object, e As System.EventArgs) Handles btnPrint.Click
        Dim printDialog1 As PrintDialog = New PrintDialog
        printDialog1.Document = printDocument1
        Dim result As DialogResult = printDialog1.ShowDialog
        If (result = DialogResult.OK) Then
            printDocument1.Print()
        End If
    End Sub

Attached Images
 

Viewing all articles
Browse latest Browse all 27159

Trending Articles



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