用vb获取桌面图象_visualbasic教程

前端之家收集整理的这篇文章主要介绍了用vb获取桌面图象_visualbasic教程前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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,Screen.Width,Screen.Height,lDC,vbSrcCopy将桌面图象绘制到窗体 EndSub->

猜你在找的VB相关文章