Results 1 to 9 of 9

Thread: Taking A screen shot

  1. #1

    Thread Starter
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943

    Taking A screen shot

    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
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  2. #2

    Thread Starter
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    anyone??
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  3. #3
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Please someone help him. He is in need. JK what's up skitchen8.

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Check out this screen capture code http://161.58.186.97/showthread.php?s=&threadid=89655

  5. #5
    Addicted Member
    Join Date
    Jun 2001
    Posts
    183
    Adding to Kaverin's example, (but leaving out the comments)...

    VB Code:
    1. Option Explicit
    2.  
    3. 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
    4. Private Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Long) As Long
    5. Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long
    6. Private Declare Function GetCursorPos Lib "user32.dll" (lpPoint As POINT_TYPE) As Long
    7.  
    8. Private Type POINT_TYPE
    9.   x As Long
    10.   y As Long
    11. End Type
    12.  
    13. Private Sub cmdSnapShot_Click()
    14.    Dim hDCScreen As Long
    15.    Dim coord As POINT_TYPE
    16.    Call GetCursorPos(coord)
    17.  
    18.    With picSnapShot
    19.       .ScaleMode = vbPixels
    20.       .Width = 100
    21.       .Height = 100
    22.       .BorderStyle = vbBSNone
    23.       .AutoRedraw = True
    24.       .Visible = False 'True
    25.       hDCScreen = GetWindowDC(0)
    26.       BitBlt .hDC, 0, 0, .ScaleWidth, .ScaleHeight, hDCScreen, coord.x - 50, coord.y - 50, vbSrcCopy
    27.       ReleaseDC 0, hDCScreen
    28.       SavePicture .Image, "c:\screenshot.bmp"
    29.    End With
    30. 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..

  6. #6

    Thread Starter
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    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
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  7. #7

    Thread Starter
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Originally posted by jjortiz
    Please someone help him. He is in need. JK what's up skitchen8.
    i am in need though, this is supposed to go along w/ my keylogger, so i know everything!! ONE DAY I WILL CONTROL THE WORLD im not up to much of anything... u??
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  8. #8
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    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

  9. #9

    Thread Starter
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    ok... 1 more question, is it possible to imprint date and time on the picturebox?? how would i do this??
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width