vb设计屏幕截图程序

时间:2015-09-23 09:59:25
【文件属性】:

文件名称:vb设计屏幕截图程序

文件大小:24KB

文件格式:DOCX

更新时间:2015-09-23 09:59:25

vb 屏幕截图

vb设计屏幕截图,api '截图模Private Type PALETTEENTRY peRed As Byte peGreen As Byte peBlue As Byte peFlags As Byte End Type 块Module1.bas,以下程序放入标准模块内 '创建BMP位图 Public Function CreateBitmapPicture(ByVal hBmp As Long, ByVal hPal As Long) As Picture Dim r As Long Dim Pic As PicBmp Dim IPic As IPicture Dim IID_IDispatch As GUID '填充IDispatch界面 With IID_IDispatch .Data1 = &H20400; .Data4(0) = &HC0; .Data4(7) = &H46; End With '截图处理 Public Function CaptureWindow(ByVal hWndSrc As Long, ByVal Client As Boolean, ByVal _ LeftSrc As Long, ByVal TopSrc As Long, ByVal WidthSrc As Long, ByVal HeightSrc _ As Long) As Picture '使用时 Dim tmpPicture As Picture 'Public Const snapFolder = "c:/Snap" '截图保存位置 '捕捉活动窗口 Set tmpPicture = CaptureActiveWindow() '捕捉整个屏幕 Set tmpPicture = CaptureScreen() '保存时 SavePicture tmpPicture, "FileName完整路径名称"


网友评论