You should also see the
PrintWindow function for capturing images.
The good thing about this function is that it can capture a window even if it is hidden behind other windows.
The bad thing is that it is not supported on Windows 98.
___
[tt]
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function PrintWindow Lib "user32" (ByVal hWnd As Long, ByVal hdcBlt As Long, ByVal nFlags As Long) As Long
Private Sub Form_Load()
Dim hWndCalc As Long
BackColor = vbWhite
AutoRedraw = True
'start calculator and find its window handle
Shell "calc.exe", vbNormalFocus
DoEvents
hWndCalc = FindWindow(vbNullString, "Calculator")
'Print the Calculator window image on the form
PrintWindow hWndCalc, hDC, 0
'Now the image of the window can be
'accessed using Me.Image picture object
'Print the image on printer as well
Printer.PaintPicture Me.Image, 0, 0
Printer.EndDoc
End Sub[/tt]
___
After drawing the captured image on a device context, you can save it to disk or print it. I tested the above code and found no distortion on captured or printed image.