Sunday, June 17, 2012

PrintWindow - Capture Form Beserta Seluruh Objeknya

Option Explicit

Private Declare Function PrintWindow Lib "user32" (ByVal hwnd As Long, ByVal hdcBlt As Long, ByVal nFlags As Long) As Long

Private Sub Command2_Click()
Picture1.AutoRedraw = True
Set Picture1.Picture = Nothing
PrintWindow Me.hwnd, Picture1.hDC, 0
Picture1.Refresh
End Sub