PrintScreen only active window

后端 未结 6 2060
太阳男子
太阳男子 2021-01-07 08:22

I\'m writing a simple Windows Forms utility to screenshot either the entire screen or an active window and save the file. The winform has a button called \'Capture\' that, w

6条回答
  •  悲&欢浪女
    2021-01-07 09:01

    You need to borrow the design of commercially available screen capturing apps, such as Psp. I think you need to use a 'hot' key to trigger the capturing of the active window. Instead of doing it on Capture_Click event. This way, you can hide your application's window so that it does not become the active window. Then when the user pushes the 'hot' key, you can capture it.

提交回复
热议问题