SavePicture不能保存控件
用网上找的Capture函数又不能保存超过屏幕外围的图形求高手,怎么解决这个问题,我必须要保存到BMP图象
用网上找的Capture函数又不能保存超过屏幕外围的图形求高手,怎么解决这个问题,我必须要保存到BMP图象
解决方案 »
- 哪位前辈有或知道哪里API视频讲座之类的
- 为何inet发送文件时状态信息重复显示?
- "运行时出错‘-214702383(80070422):Automation错误"
- 主题:简单的嵌套选择语句,到底错在哪了。
- 韩文系统下怎么样才能正常使用简体中文下开发的程序
- 呵呵,这么晚了还有这么多人和我一样在工作,战友们加油干呀。内有两个问题
- vb中用dbgrid显示记录的问题
- 新手关于AcitveX DLL的问题
- vb调用dll的问题
- 如何测试当前的操作系统版本?
- 在学校一直用access,听说找工作许多需要sql server,所以想知道怎么写存储过程和触发器,怎样在程序中调用,请各位大哥帮忙。
- 关于MSHFLEXGRID的单元格合并
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属性。