Abro este hilo para postear un código en respuesta a una pregunta del blog, la cual preguntan porque da error de impresora cuando se llama a PrintForm y hay control de usuario con windowless (transparentes) , bien no se cual es el problema y cual es la solución correcta, ya que si se pone un control label o un image este problema no ocurre, solo pasa con los usercontrols, o es un problema de vb o ignoro la solución, así que de momento planteo esta alternativa a PrintForm
Option Explicit
Private Declare Function BitBlt Lib "gdi32.dll" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Function GetDC Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32.dll" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Public Sub FormPrint(oForm As Form)
Dim lHdc As Long
oForm.AutoRedraw = True
lHdc = GetDC(oForm.hwnd)
BitBlt oForm.hdc, 0, 0, oForm.ScaleX(oForm.ScaleWidth, oForm.ScaleMode, vbPixels), _
oForm.ScaleY(oForm.ScaleHeight, oForm.ScaleMode, vbPixels), _
lHdc, 0, 0, vbSrcCopy
ReleaseDC oForm.hwnd, lHdc
Printer.PaintPicture oForm.Image, 0, 0
Printer.EndDoc
oForm.Cls
oForm.AutoRedraw = False
End Sub
Ejemplo
Private Sub Command1_Click()
FormPrint Me
End Sub