|
-
Aug 23rd, 2010, 09:21 PM
#22
New Member
Re: Easy Screen Capture Class - Capture Screen, Desktop Region, Form, or Controls
I am having a weird problem and was hoping someone could offer a pointer or two...
Consider the following sub:
Code:
Private Sub _timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
Dim sc As New ScreenShot.ScreenCapture
Debug.Print("Tick: " & Now)
If rdp.Count > 0 Then
For Each r As _rdp In rdp
r.pic.Image = sc.CaptureWindow(r.rdp.Handle).GetThumbnailImage(160, 120, Nothing, Nothing)
Next
End If
sc = Nothing
End Sub
It triggers every 3 seconds, refreshing the r.pic.image with a screen cap from r.rdp.handle. Pretty straight forward, right? Well, except what is happening is that the resulting image is re-shrunk every iteration so the first image is 160x120, the second is much smaller, the third - even smaller, the fourth is basically a single pixel and from 5 on it is nothing.
If I run without GetThumbnailImage(), the image in the picturebox moves every iteration by roughly 30 pixels in both X and Y.
Anyone ever run into this before?
HELP!
Ron
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
|