IronRuby > Frequently Asked Questions > Samples and tutorials > Hello World in Windows Forms

Hello World in Windows Forms

Table of contents
No headers

This is a very simple step to create Dialog with IronRuby. I assumed you get IronRuby and have ir.exe

1. run the IronRuby interactive console

C:\OpenSource\ironRuby\trunk\build\debug>ir.exe

2. create reference to Windows Forms namespace

>>> require 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll'

3. create global object to hold MessgeBox class

>>> $ironForm = System::Windows::Forms::MessageBox

4. call show dialog

>>> $ironForm.show 'Hello World IronRuby'
Tag page
You must login to post a comment.