The successor of vruby was released by Banjo at bitbucket, it is wrb. Please try it.
Hi old folks, it is almost 10 years since the last activity on this page.
A NEW LIBRARY will be released by Banjo Koyu for ruby-2.x this year. This will be a good selection on ruby-2.x on Windows because vruby is not available for ruby-2.0 and later.
vrswin090207 is the snapshot tarball for ruby-1.9.1
Cause SEGV when using ActiveX with Ruby's thread.
Deadlocks happen by calling SendMessage() or functions that call it internally from non-owner thread of the window. (ruby-1.9)
In this page
screenshots(I'll create another page about them)
"VisualuRuby" is a GUI library on MS Windows for Ruby.
The project has two part, one is "swin" which is about ruby extension library,
the other is "vruby" : a set of vr* series of ruby scripts which wrap swin.
The event handling style is like that of VisualBasic.
Most Frequently Answered Questions
Q: Can I have more English documentations?
A: Now I'm working for it.
Q: Can I get some help at ruby scripting on VisualStudio?
A: No. This project has nothing to do with VisualStudio.
Q: You mis-spelling the project name, don't you?
A: No. This project name is 'VisualuRuby'
- Win32 environment
- FYI, my environment is on Win98.
- Ruby interpreter
- There are some ruby interpreters, mswin32/mingw32/cygwin/...
- I'm using its cygwin version.
- This is a DLL for this project and by this project.
- This is included by some binary distributions of ruby interpreters on Windows.
- You can make this DLL with a C compiler.
You don't need another additional DLL.
- create/show/destroy window.
- add child window(button/combobox/treeview and so on) on the window.
- event handling for window's messages. (WM_LBUTTONUP,WM_COMMAND,...)
- making a subclass of system-define window class.
- creating menues.
- creating common dialog (not all dialogs)
- drawing the window using pen,brush,font,..
- bitmap class is prepared.
- handling idleloop in messageloop
- handling Ctrl-C in messageloop
- creating modal dialog
- using printer
- programming with visualbasic-like style.(visualbasic is Microsoft's product)
- easily creating window.
- easily creating controls on the window.
- easily handling messages to the window.
- layout manager(?) available
- playing multimedia files (AVI/WAV/MP3/...) available with MCI
- owner-draw (button)
- dde (execute/poke/request client, execute server)
- arrayed control supported
- Drag &Drop (file/OLE)
- MultiThreading (I'm sorry mswin/mingw ruby is hard to use this because of longjmp() problem, but a patch for ruby has already realized for 1.6.7)
- And so on,
These two scripts provides a same window to capture WM_COMMAND message sent by a Button.
WM_COMMAND = 0x00000111
WS_VISIBLECHILD = 0x50000000
BS_PUSHBUTTON = 0x00000000
bn.etc=1234 #control id
bn.style=WS_VISIBLECHILD | BS_PUSHBUTTON
def mw.msghandler(msg) #msg has attrs of hWnd,msg,wParam,lParam
if msg.msg==WM_COMMAND then
messageBox "Button Pushed"
class MyForm < VRForm
messageBox "Button Pushed"
You can get the products from Ruby Application Archives, but the latest version may be not available there.
And I'm sorry that I'm afraid I'll miss to update this English page.
The real latest version is available at download page in Japanese .
The archives are in two style: lzh and zip
source files of "swin" and five test scripts in lzh.
- (62kB) 09/02/07 version (yyyy/mm/dd).
scripts of vruby and test scripts in lzh.
- (98kB) 08/02/29
set of sample scripts. (zip)
- English sample description is available.
- Some scripts file include SJIS-coded Japanese Text. Use -Ks option for ruby.
Yukimi-sake is developing GUI builder "FormDesigner" for this project. (Screen capture:Screen capture 2)
He is also distributing compiled html help(chm) about this project.
The vruby's reference is included in the script in RD format as comments.
- I understand that method namings are not good because there are no consistent way, so the method names may be changed.
- There are English documents about vruby part, but no English documents for