www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to Get Screenshot on Windows ?

reply Softwarez <NotValidMail gmail.com> writes:
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.
May 27
parent Vladimir Panteleev <thecybershadow.lists gmail.com> writes:
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
May 27