win32 screen captures

Robin Becker robin at jessikat.fsnet.co.uk
Fri Aug 10 12:00:04 EDT 2001


In article <3b73ed53.977798 at nntp.sprynet.com>, David C. Ullrich
<ullrich at math.okstate.edu> writes
.....
>>Has anyone managed to use PIL and win32com to do screen captures?
>
>Well, I don't know how to do the Windows stuff from PIL or win32com,
>but there's presumably easy ways to do it. If you want a hint what
>Windows stuff to try to do: (i) You create a bitmap (presumably
>this is easy in PIL, whether you can use that might depend
>on whether PIL gives you access to a device context for the
>bitmap). (ii) You get a device context for the screen from
>GetDC(0) (iii) You BitBLT from the screen device context
>to the bitmap's device context. (If this can't be done easily
>using PIL and win32com it can certainly be done using
>whatever.py, that Win32 API module.)
>

yes I'm crawling through C code to do it right now, but I thought
perhaps there were some nice entry points in win32 that might get me the
DC etc etc.

I have also managed to get a PDF App to pop up using COM directly, but
can't seem to get an open document into it, whine

>David C. Ullrich

-- 
Robin Becker



More information about the Python-list mailing list