How to Get Screenshot on Windows ?
Vladimir Panteleev via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat May 27 23:48:42 PDT 2017
On Sunday, 28 May 2017 at 04:05:47 UTC, Softwarez wrote:
> Hi can anyone please help me how to get screenshot on Windows
> using D, because all the other threads are using linux to get
> screenshot.
In the same way you'd do it in C.
Here is a more convoluted D example in the form of a program I
had lying around. It takes a screenshot of a window with alpha
transparency, by taking two screenshots with white and black
background, and calculating the alpha channel from those:
https://dump.thecybershadow.net/e6e1fc9bb0da97dbe0b198a243aac31c/windowscr.d
It uses my image library for bitmap manipulation:
https://github.com/CyberShadow/ae
More information about the Digitalmars-d-learn
mailing list