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)
Spoiler (Click to View)
|
.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)
Jan 14, 2018 04:29 AM
(This post was last modified: Jan 14, 2018 04:30 AM by Ninja.)
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.
Jan 15, 2018 01:14 PM
(This post was last modified: Jan 15, 2018 01:15 PM by gigajew.)
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.
![]() (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 |