Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hdc As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (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
Private Const SRCCOPY = &HCC0020
Private Sub Timer1_Timer()
Dim lngDesktopHwnd As Long
Dim lngDesktopDC As Long
Me.Picture1.Picture = LoadPicture("")
Picture1.AutoRedraw = True
Picture1.ScaleMode = vbPixels
lngDesktopHwnd = GetDesktopWindow '该函数返回桌面窗口的句柄
lngDesktopDC = GetDC(lngDesktopHwnd)
Picture1.Width = Screen.Width
Picture1.Height = Screen.Height
Call BitBlt(Picture1.hdc, 0, 0, Screen.Width, Screen.Height, lngDesktopDC, 0, 0, SRCCOPY)
Picture1.Picture = Picture1.Image
Call ReleaseDC(lngDesktopHwnd, lngDesktopDC) '清理DC
End Sub
Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hdc As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (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
Private Const SRCCOPY = &HCC0020
Private Sub Timer1_Timer()
Dim lngDesktopHwnd As Long
Dim lngDesktopDC As Long
Me.Picture1.Picture = LoadPicture("")
Picture1.AutoRedraw = True
Picture1.ScaleMode = vbPixels
lngDesktopHwnd = GetDesktopWindow '该函数返回桌面窗口的句柄
lngDesktopDC = GetDC(lngDesktopHwnd)
Picture1.Width = Screen.Width
Picture1.Height = Screen.Height
Call BitBlt(Picture1.hdc, 0, 0, Screen.Width, Screen.Height, lngDesktopDC, 0, 0, SRCCOPY)
Picture1.Picture = Picture1.Image
Call ReleaseDC(lngDesktopHwnd, lngDesktopDC) '清理DC
End Sub
![](http://imgsrc.baidu.com/forum/w%3D580/sign=2ae93be59c510fb37819779fe932c893/14800df41bd5ad6e11e011b683cb39dbb7fd3ce8.jpg?v=tbs)