|
-
Aug 28th, 2001, 12:25 AM
#1
Thread Starter
New Member
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?
-
Aug 28th, 2001, 05:55 PM
#2
Frenzied Member
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!
-
Aug 29th, 2001, 02:12 AM
#3
PowerPoster
Code:
[Pseudo]
DC = GetWindowDC(GetDesktopWindow)
BitBlt YourPicture, 0, 0, DC, 0, 0, ScreenW, ScreenH, vbSrcCopy
[/Pseudo]
-
Aug 29th, 2001, 06:08 AM
#4
Frenzied Member
yeah that never took me long.
Sanity is a full time job
Puh das war harter Stoff!
-
Aug 29th, 2001, 05:32 PM
#5
Junior Member
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..
-
Aug 30th, 2001, 10:19 AM
#6
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|