Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim bm As New Bitmap(Me.Panel1.Width, Me.Panel1.Height) Panel1.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel1.Width, Me.Panel1.Height)) e.Graphics.DrawImage(bm, 0, 0) Dim aPS As New PageSetupDialog aPS.Document = PrintDocument1 End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)