0

当您按下 alt+printscreen(至少在 Windows 中)时,您将获得当前活动(并且可见?)窗口的屏幕截图。

如何使用 win32Api 调用来调用它?

4

1 回答 1

0

怎么样Win32::Screenshot
https://github.com/jarmo/win32screenshot

gem install win32screenshot    

require 'win32/screenshot'

# Take a screenshot of the foreground
Win32::Screenshot::Take.of(:foreground).write("image.png")

# Take a screenshot of the window with the specified title
Win32::Screenshot::Take.of(:window, :title => "Abc").write("image.bmp")
于 2012-05-18T19:34:35.580 回答