VB如何抓取指定屏幕区域。

caixicn 2005-09-13 08:29:00
VB如何抓取指定屏幕区域。
谢谢
...全文
267 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
weiym 2005-09-14
  • 打赏
  • 举报
回复
提供邮箱我发给你
caixicn 2005-09-14
  • 打赏
  • 举报
回复
该怎么用呢?
northwolves 2005-09-13
  • 打赏
  • 举报
回复
StretchBlt

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
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 Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Private Sub Command1_Click()
Dim wS As Long, hS As Long, w As Long, h As Long
Picture1.Cls
Picture1.ScaleMode = vbPixels
wS = Screen.Width \ Screen.TwipsPerPixelX
hS = Screen.Height \ Screen.TwipsPerPixelY
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
StretchBlt Picture1.hdc, 0, 0, w, h, GetDC(0), 0, 0, wS, hS, vbSrcCopy
ReleaseDC Picture1.hwnd, GetDC(0)
End Sub
laviewpbt 2005-09-13
  • 打赏
  • 举报
回复
bitblt

1,485

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧