Imagen del resultado de la impresión:
Public Sub PrintPanel(myPanel As Panel, spath As String) Const WM_PRINT As Integer = &H317 Dim myBmp As Bitmap Dim myGraphics As Graphics Dim hdc As System.IntPtr myBmp = New Bitmap( _ myPanel.DisplayRectangle.Width, _ myPanel.DisplayRectangle.Height) myGraphics = Graphics.FromImage(myBmp) myGraphics.DrawRectangle(Pens.Black, New Rectangle(0, 0, myPanel.DisplayRectangle.Width, myPanel.DisplayRectangle.Height)) hdc = myGraphics.GetHdc '"FormsDispPanel" is your PAnel to print Call SendMessage(myPanel.Handle, WM_PRINT, hdc, _ EDrawingOptions.PRF_CHILDREN Or _ EDrawingOptions.PRF_CLIENT Or _ EDrawingOptions.PRF_NONCLIENT Or _ EDrawingOptions.PRF_OWNED) myGraphics.ReleaseHdc(hdc) myBmp.Save(spath) myGraphics.Dispose() myGraphics = Nothing myBmp = Nothing End Sub