Article ID: 188006
Article Last Modified on 5/13/2003
161299 HOWTO: Capture and Print the Screen, a Form, or any Window
MSChart1.EditCopy
Dim pic As Picture
With Picture1
'Size/position the picture box so that it matches
'the MSChart control
.Width = MSChart1.Width
.Height = MSChart1.Height
MSChart1.Top = 0
MSChart1.Left = 0
'Get a picture of the contents of the picturebox
Set pic = CaptureWindow(.hWnd, False, 0, 0, _
.ScaleX(.Width, vbTwips, vbPixels), _
.ScaleY(.Height, vbTwips, vbPixels))
End With
'Copy the picture to the clipboard
Clipboard.Clear
Clipboard.SetData pic
161299 HOWTO: Capture and Print the Screen, a Form, or any Window
Additional query words: kbDSupport kbDSD kbVBp kbCtrl kbVBp500bug kbPrint kbVBp600bug
Keywords: kbbug KB188006