As far as I know this is not directly possible with Pygame as it's focus is
on the window it creates. But you can use another method to do what you
want.
Read this:
https://stackoverflow.com/questions/2846947/get-screenshot-on-windows-with-python

On 20 June 2017 at 12:35, Peter Irbizon <peterirbi...@gmail.com> wrote:

> Hello,
>
> I wondered if this is possible with pygame - I would like to take
> screenshot of my desktop. It means, my pygame app should run in background
> and be able to take whole screenshot of any application/whole desktop (not
> just itself), even in fullscreen mode (of in opengl, directx, direct3d, sdl
> mode).
> Because I tried to achieve this with python GTK but app for example when I
> took screenshot of my desktop and some video player with direct3d were
> running, I got black rectangle in that screen position.
>
> Is there any sample code for this please?
> Many thanks
>



-- 
Kalasuri Diliup Gabadamudalige

https://dahamgatalu.wordpress.com/
http://soft.diliupg.com/
http://www.diliupg.com

**********************************************************************************************
This e-mail is confidential. It may also be legally privileged. If you are
not the intended recipient or have received it in error, please delete it
and all copies from your system and notify the sender immediately by return
e-mail. Any unauthorized reading, reproducing, printing or further
dissemination of this e-mail or its contents is strictly prohibited and may
be unlawful. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.
**********************************************************************************************

Reply via email to