PublicDeclareFunctionGetDesktopWindowLib”user32″()AsLong
PublicDeclareFunctionGetDCLib”user32″(ByValhwndAsLong)AsLong
PublicDeclareFunctionBitBltLib”gdi32″_
(ByValhDestDCAsLong,_
ByValxAsLong,_
ByValyAsLong,_
ByValnWidthAsLong,_
ByValnHeightAsLong,_
ByValhSrcDCAsLong,_
ByValxSrcAsLong,_
ByValySrcAsLong,_
ByValdwRopAsLong)AsLong
PrivateSubForm_Load()
DimlDesktopAsLong
DimlDCAsLong
Form1.AutoRedraw=True
Form1.ScaleMode=1
lDesktop=GetDesktopWindow()取得桌面窗口
lDC=GetDC(lDesktop)取得桌面窗口的设备场景
BitBltMe.hDC,0,0,Screen.Width,Screen.Height,lDC,0,0,vbSrcCopy将桌面图象绘制到窗体
EndSub->