Results 1 to 6 of 6

Thread: Screenshot and Stuff

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    7

    Question Screenshot and Stuff

    Hi!

    Got a little problem.
    Screenshots. While taking them and importing them inte VB takes about a second. Is there any faster way?
    Then I want to get the area that changed from the new screenshot and the old screenshot (just that square) and save it into memory for transfer.
    This method would take some time and because I'm working on a small remote control app, I want it to go faster thatn 1-2 seconds between each frame. Then it would be kinda slow.

    Is it possible to do this, and if so how?

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Can I ask how you are taking the screenshots, I can't remember it taking so long.
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Code:
    [Pseudo]
    DC = GetWindowDC(GetDesktopWindow)
    
    BitBlt YourPicture, 0, 0, DC, 0, 0, ScreenW, ScreenH, vbSrcCopy
    [/Pseudo]

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    yeah that never took me long.
    Sanity is a full time job

    Puh das war harter Stoff!

  5. #5
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19

    Angry I have a Similar Problem

    1) If you are using the Clipboard to get the ScreenShot its much Slower that going internally and using the Desktop Dc (if you dont know what i am talking about write to me at [email protected] ill explain)

    2)I also want to know how to grab a selected Rectangle and paste it as background into a form to make a fake transparency. The problem Lies in Unit conversion (if you can ,see my post).

    3)I can Help you giving you some advice
    you can get the current window handle with the GetForgroundWindow Api and from there get its Dc that way you wont have to retransfer the Whole Desktop only the window...

    Any Progress Tell me... im also very interested in doing a remote capture app myself..

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    7
    Well, I pressed the Print Screen button, and got the Data from the ClipBoard, but it took eternity, so I've found a faster way.

    '// Used to get the Window DC
    Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

    '// Used to get the desktops hWnd
    Private Declare Function GetDesktopWindow Lib "user32" () As Long

    '// Need 2 explain BitBlt?
    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


    BitBlt DestImg.hDC, 0, 0, 500, 500, GetDC(GetDesktopWindow()), 0, 0, vbSrcCopy

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