Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Capture desktop with the least memory consuming method.

This is what i use and it cant be the best way because i tested dark comet's screencapture and it uses way less memory .
Spoiler (Click to View)
the thread running just on part of the code and you dont dispose the image
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
Like HFDone said you should dispose of the graphics and bitmap used. I tested it and for me it worked fine if put in a while loop. I used a using-statement, if you haven't used it before or don't know what it is I highly recommend you look it up.
If you're planning on uploading these screenshots as some form of rudimentary screen sharing system you will want to look into image compression.

[Image: DreddSig.gif]
Try something like this. Create an instance of the class while your application is alive, and make sure you dispose of it after. Subscribe to the OnScreenshotTaken event to get regular screenshots. I'm very rusty in Visual Basic .NET so there may be some mistakes.

[Image: Syr3DlV.png]
The problem is that OP wants to get his process lower than 17MB, but any program in .NET is out of the box 17MB. What OP wants has nothing to do with the actual remote desktop function.
(Jan 16, 2018 04:47 AM)Owl Wrote:  Infinite looping will of course drive memory usage up. You could suspend capturing while the system is idle and at an interval >300ms.

On top of that, consider capturing only the active window.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by salemxx66Sep 30, 2021 08:39 PM 0 130 Sep 30, 2021 08:39 PM
Last Post: salemxx66
[C#] by hacker dzApr 22, 2021 08:27 AM 3 327 Apr 22, 2021 08:27 AM
Last Post: Scapula™
[C#] by chris_sergeMay 18, 2016 07:54 AM 7 153 May 18, 2016 07:54 AM
Last Post: chris_serge