2

I've found a way to create virtual desktops with c#. Now I was wondering if we can take a screenshot of a particular desktop and if so how ?

Thanks in advance

Blizz

2 Answers2

1

HAve you tried the CopyFromScreen method in the GFX Object

        Graphics g = new Graphics();
        g.CopyFromScreen(  ....params.... )
Eoin Campbell
  • 43,500
  • 17
  • 101
  • 157
  • 1
    I assume with virtual desktop Blizz means a dektop created with CreateDesktop. CopyFromScreen won't work across desktops. – Ben Schwehn May 28 '09 at 20:06
0

I haven't tried it but the first thing I'd try is:

  • create a new thread
  • switch the thread to the new desktop by calling SetThreadDesktop
  • take a screen shot
  • switch thread back

might just work.

Ben Schwehn
  • 4,505
  • 1
  • 27
  • 45