# Re: save file in win32 os

**URL:** <https://www.ruby-forum.com/t/re-save-file-in-win32-os/141065>\
**Category:** Ruby\
**Created:** [June 21, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/re-save-file-in-win32-os/141065 "2008-06-21T16:01:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [June 21, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/re-save-file-in-win32-os/141065/1 "2008-06-21T16:01:55Z")

</div>

Dear Raphael,

> I would like to save a file with ruby using API32 with “dialog box save”  
> to choose the filename and the directory, I have no idea to code this,  
> someone can help me  
> Thank you

you’ll need a GUI application for Ruby.  
There are many … see here: [http://www.trug.ca/Ruby\_GUI\_Toolkits](http://www.trug.ca/Ruby_GUI_Toolkits)  
In addition to the list given there, there are some that use Java via  
JRuby …  
make a Google search for Monkeybars, Profligacy, Cheri.

I like Shoes most at the moment:

you get some example code for your problem right on this page:

[http://blog.viamentis.com/articles/2008/04/04/shoes-a-ruby-gui-toolkit/](http://blog.viamentis.com/articles/2008/04/04/shoes-a-ruby-gui-toolkit/)

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [June 21, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/re-save-file-in-win32-os/141065/2 "2008-06-21T19:11:54Z")

</div>

Hi Raphael,

If you know how to do it in C/C++ using the Windows API, then you can  
very easily do it in Ruby on Windows using the Win32API. There’s a  
getting started in the Pickaxe book  
([http://whytheluckystiff.net/ruby/pickaxe/html/win32.html](http://whytheluckystiff.net/ruby/pickaxe/html/win32.html)) - but this  
is really just a primer. Once you’ve got your head around the  
bindings, the real documentation is, of course, in the Windows API  
itself, which is all available on [msdn.com](http://msdn.com).  
If you’re not familiar with Windows programming in general, then, as  
Axel said, you’re better off using an easier GUI toolkit, which will  
handle the Windows API stuff for you.
