You can use the GetDesktopWindow() and GetWindowDC() APIs to BitBlt a portion of the Desktop
.
VB Code:
Public Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow" () As Long
Public Declare Function GetWindowDC Lib "user32" Alias "GetWindowDC" (ByVal hwnd As Long) As Long
Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (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
Dim DesktopDC as Long
DesktopDC = GetWindowDC(GetDesktopWindow())
BitBlt picDest.hDC, 0, 0, Width, Height, DesktopDC, X, Y, vbSrcCopy