IronRuby 调用 WinForms DEMO

require 'System.Windows.Forms'
include System::Windows::Forms

class RForm < Form 
end 

f = RForm.new
ome = proc {|sender, e| puts "Enter"} 
oml = proc {|sender, e| puts "Leave"} 
f.mouse_enter(&ome) 
f.mouse_leave(&oml) 
  
Application.run(f)

你可能感兴趣的:(.net,windows,职场,4.0,休闲,Forms,IronRuby)