Is there a way to take a screenshot everytime the user clicks the mouse, ideally cut it to a 100x100 pixel square w/ the pointer in the middle. And if there is can i please have code for it.
thx
Printable View
Is there a way to take a screenshot everytime the user clicks the mouse, ideally cut it to a 100x100 pixel square w/ the pointer in the middle. And if there is can i please have code for it.
thx
anyone??
Please someone help him. He is in need. JK what's up skitchen8.
Check out this screen capture code http://161.58.186.97/showthread.php?s=&threadid=89655
Adding to Kaverin's example, (but leaving out the comments)...
VB Code:
Option Explicit Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC 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 dwRop As Long) As Long Private Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long Private Declare Function GetCursorPos Lib "user32.dll" (lpPoint As POINT_TYPE) As Long Private Type POINT_TYPE x As Long y As Long End Type Private Sub cmdSnapShot_Click() Dim hDCScreen As Long Dim coord As POINT_TYPE Call GetCursorPos(coord) With picSnapShot .ScaleMode = vbPixels .Width = 100 .Height = 100 .BorderStyle = vbBSNone .AutoRedraw = True .Visible = False 'True hDCScreen = GetWindowDC(0) BitBlt .hDC, 0, 0, .ScaleWidth, .ScaleHeight, hDCScreen, coord.x - 50, coord.y - 50, vbSrcCopy ReleaseDC 0, hDCScreen SavePicture .Image, "c:\screenshot.bmp" End With End Sub
So now it centers 100x100 shot around the mouse, but I don't know know to capture a mouse click. At least you're closer..
:p
Thank you so much everyone, i am trying to get it to capture the mouse click... that shouldn't be too hard. But if i don't get it ill just post another thread:D
:D i am in need though, this is supposed to go along w/ my keylogger, so i know everything!! :D:D ONE DAY I WILL CONTROL THE WORLD:D:D im not up to much of anything... u??Quote:
Originally posted by jjortiz
Please someone help him. He is in need. JK what's up skitchen8.
This tip will tell you the window handle of the window that the mouse is currently over...that may help you
http://161.58.84.209/api/tip369.html
ok... 1 more question, is it possible to imprint date and time on the picturebox?? how would i do this??