c# screen capture virtual desktop

混江龙づ霸主 提交于 2020-01-23 12:33:47

问题


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


回答1:


HAve you tried the CopyFromScreen method in the GFX Object

        Graphics g = new Graphics();
        g.CopyFromScreen(  ....params.... )



回答2:


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.



来源:https://stackoverflow.com/questions/922546/c-sharp-screen-capture-virtual-desktop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!