时间: 2021-07-31 作者:daque
作家:小屠 public declare function getdesktopwindow lib "user32" () as longpublic declare function getdc lib "user32" (byval hwnd as long) as longpublic 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 longprivate sub form_load()dim ldesktop as longdim ldc as longform1.autoredraw = trueform1.scalemode = 1ldesktop = getdesktopwindow() '博得桌面窗口ldc = getdc(ldesktop) '博得桌面窗口的摆设场景bitblt me.hdc, 0, 0, screen.width, screen.height, ldc, 0, 0, vbsrccopy '将桌面图象绘制到窗体end sub