已知窗體的句柄為hwnd
GetWindowRect(hwnd, rRect)
lWidth = rRect.right - rrect.left
lHeight=rrect.botton - rrect.top
hdcScreen=GetDC(0)
Bitblt(ddc, 0, 0, lheight, lwidth, hdcscreen, rrect.left, rrect.top, lwidth, lheight, vbsrccopy)
releasedc(0, hdcscreen)
'其中 ddc為存儲抓出的圖片的目標DC,例如你用另一個picture控件保存,則為
Bitblt(picture.hdc, 0, 0, lheight, lwidth, hdcscreen, rrect.left, rrect.top, lwidth, lheight, vbsrccopy)