给你提供2套方案 1、假设picture1中有任意个控件,picture1.autosize=true Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc 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 nSrcWidth As Long, _ ByVal nSrcHeight As Long, _ ByVal dwRop As Long) As Long Private Const SRCCOPY = &HCC0020 '----------------------------------------------------------------------------------------- Pritave Sub Form_Load() '将picture2放在picture1内部 picture2.visible=false pictue2.autosize=true picture2.left=0 picture2.top=0 picture1.autosize=false end sub Pritave Sub Command1_Click() dim w,h as integer w=picture1.width h=picture1.height stretchblt picture2.hdc,0,0,w,h,picture1.hdc,0,0,w,h,SRCCOPY picture1.picture=loadpicture() picture2.visible=true end subPrivate Sub SavePic_Click() with commondialog1 .dialogtitle="保存为..." .filter="位图文件(*.bmp)|*.bmp" end with commondialog1.showsave if commondialog1.filename <> "" then if err <> 32755 then savepicture picture2.image,savebmpname end if end if end sub
1、假设picture1中有任意个控件,picture1.autosize=true
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc 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 nSrcWidth As Long, _
ByVal nSrcHeight As Long, _
ByVal dwRop As Long) As Long
Private Const SRCCOPY = &HCC0020
'-----------------------------------------------------------------------------------------
Pritave Sub Form_Load()
'将picture2放在picture1内部
picture2.visible=false
pictue2.autosize=true
picture2.left=0
picture2.top=0
picture1.autosize=false
end sub
Pritave Sub Command1_Click()
dim w,h as integer
w=picture1.width
h=picture1.height
stretchblt picture2.hdc,0,0,w,h,picture1.hdc,0,0,w,h,SRCCOPY
picture1.picture=loadpicture()
picture2.visible=true
end subPrivate Sub SavePic_Click()
with commondialog1
.dialogtitle="保存为..."
.filter="位图文件(*.bmp)|*.bmp"
end with
commondialog1.showsave
if commondialog1.filename <> "" then
if err <> 32755 then
savepicture picture2.image,savebmpname
end if
end if
end sub
http://www.china-askpro.com/msg2/qa05.shtml//超过屏幕范围
这样就没什么什么好办法了,发送消息,把屏幕外的东东移动到屏幕内,多次抓图,最后合并试试吧
要保存PictureBox中的图像为BMP,一共有两个条件:1:PictureBox的AutoRedraw属性为True2: SavePicture后面要用PictureBox的Image属性,而不是Pictrue属性。