# Excel and FxRuby windows

**URL:** <https://www.ruby-forum.com/t/excel-and-fxruby-windows/180310>\
**Category:** Ruby\
**Created:** [December 17, 2009, 5:50am UTC](https://www.ruby-forum.com/t/excel-and-fxruby-windows/180310 "2009-12-17T05:50:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drlelon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@drlelon](https://www.ruby-forum.com/u/drlelon)\
**Post date:** [December 17, 2009, 5:50am UTC](https://www.ruby-forum.com/t/excel-and-fxruby-windows/180310/1 "2009-12-17T05:50:34Z")

</div>

I have a ruby app on Windows, with an FxRuby UI that opens up Excel  
using Win32OLE. The Excel window obscures the UI at one point. How  
can I programmatically send the Excel window to the back and/or bring  
the FxRuby UI to the front. I know I can just not display the the  
Excel window at all, but I’d like to leave it open, just behind the  
UI, as if the user clicked on the ruby app’s tray icon (which they can  
always do manually, if necessary).

Thanks. --David.

---

<div class="post-metadata">

**Author:** ![drlelon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@drlelon](https://www.ruby-forum.com/u/drlelon)\
**Post date:** [December 17, 2009, 3:06pm UTC](https://www.ruby-forum.com/t/excel-and-fxruby-windows/180310/2 "2009-12-17T15:06:34Z")

</div>

On Wed, Dec 16, 2009 at 10:50 PM, djlewis [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have a ruby app on Windows, with an FxRuby UI that opens up Excel  
> using Win32OLE. The Excel window obscures the UI at one point. How  
> can I programmatically send the Excel window to the back and/or bring  
> the FxRuby UI to the front. I know I can just not display the the  
> Excel window at all, but I’d like to leave it open, just behind the  
> UI, as if the user clicked on the ruby app’s tray icon (which they can  
> always do manually, if necessary).

See if calling raiseWindow() on your FXRuby app’s main window brings  
it to the front.

---

<div class="post-metadata">

**Author:** ![drlelon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@drlelon](https://www.ruby-forum.com/u/drlelon)\
**Post date:** [December 17, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/excel-and-fxruby-windows/180310/3 "2009-12-17T17:13:12Z")

</div>

Lyle J. wrote:

> > ï¿½How can I programmatically send the Excel window to the back and/or bring  
> > the FxRuby UI to the front.

> See if calling raiseWindow() on your FXRuby app’s main window brings  
> it to the front.

That did it – thanks! I was looking for that function in the rdoc but  
did not know what it was called. Searching for “window” got too many  
hits.
