2012-05-18 70 views

回答

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") 
+0

嗯,我寧願Win32API的呼叫如果可能的話。 – MxyL