问题2你考虑的方法不对,没有抓鼠标的方法,但是可以实现,方法是:取得鼠标的位置。用GetCursorPos函数。(x,y)是HotSpot位置。xHotSpot和yHotSpot是位移。调用GetIconInfo API函数。然后叠加抓的图片。
Picture1.PaintPicture pic,x-xHotSpot,y-yHotSpot
抓桌面图片的简单的源码:
ME.Hide
DoEvents
picCopy.Width=Screen.Width
picCopy.Height=Screen.Height
picCopy.AutoRedraw=True
hDC=GetDC(0)
sx=Screen.Width\Screen.TwipsPerPixelX
sy=Screen.Height\Screen.TwipsPerPixelY
BitBlt picCopy.hDC,0,0,sx,sy,hDC,0,0,vbSrcCopy
ReleaseDC 0,hDC
picCopy.AutoRedraw=False
Picture1.PaintPicture pic,x-xHotSpot,y-yHotSpot
抓桌面图片的简单的源码:
ME.Hide
DoEvents
picCopy.Width=Screen.Width
picCopy.Height=Screen.Height
picCopy.AutoRedraw=True
hDC=GetDC(0)
sx=Screen.Width\Screen.TwipsPerPixelX
sy=Screen.Height\Screen.TwipsPerPixelY
BitBlt picCopy.hDC,0,0,sx,sy,hDC,0,0,vbSrcCopy
ReleaseDC 0,hDC
picCopy.AutoRedraw=False
在下E-Mail: [email protected]
愿和大家交个朋友!
谢谢各位捧场!
第二题,我已经获得了一个抓图控件解决了一部分,问题是:
如何完整抓取游戏\AVI\MPEG中的画面??
高手请回答!!
小弟先鞠躬了!
where is the Mouse??
[email protected]