# SetWindowPos() usage with win32api

**URL:** <https://www.ruby-forum.com/t/setwindowpos-usage-with-win32api/171284>\
**Category:** Ruby\
**Created:** [June 30, 2009, 1:13am UTC](https://www.ruby-forum.com/t/setwindowpos-usage-with-win32api/171284 "2009-06-30T01:13:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [June 30, 2009, 1:13am UTC](https://www.ruby-forum.com/t/setwindowpos-usage-with-win32api/171284/1 "2009-06-30T01:13:57Z")

</div>

All I really want to accomplish is pulling the active window to the  
front, and keep it there.

What would be the best way to achieve this using perhaps:

SetWindowPos()  
or  
SetForegroundWindow()

Any other suggestions are appreciated!

Thanks,

- Mac
