用API函数BitBlt ,GetDC 和ReleaseDC 即可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
Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long在窗体添加一个PicCopy的PictureBox和一个按纽
按纽中加入
Dim hDC As Long, intScrx As Integer, intScry As Integer
Me.Hide
DoEvents
picCopy.Width = Screen.Width
picCopy.Height = Screen.Height
picCopy.AutoRedraw = True
hDC = GetDC(0)
intScrx = Screen.Width \ Screen.TwipsPerPixelX
intScry = Screen.Height \ Screen.TwipsPerPixelY
BitBlt picCopy.hDC, 0, 0, intScrx , intScry , hDC, 0, 0, vbSrcCopy
ReleaseDC 0, hDC
picCopy.AutoRedraw = False
Me.Show 你当然可以还得VScroll来控制一下浏览整个图片框,这个自己编吧。
Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long在窗体添加一个PicCopy的PictureBox和一个按纽
按纽中加入
Dim hDC As Long, intScrx As Integer, intScry As Integer
Me.Hide
DoEvents
picCopy.Width = Screen.Width
picCopy.Height = Screen.Height
picCopy.AutoRedraw = True
hDC = GetDC(0)
intScrx = Screen.Width \ Screen.TwipsPerPixelX
intScry = Screen.Height \ Screen.TwipsPerPixelY
BitBlt picCopy.hDC, 0, 0, intScrx , intScry , hDC, 0, 0, vbSrcCopy
ReleaseDC 0, hDC
picCopy.AutoRedraw = False
Me.Show 你当然可以还得VScroll来控制一下浏览整个图片框,这个自己编吧。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货