tags:

views:

37

answers:

2

Just wondering if there is any kind of framework or method of making a Gui that will override (Stay on top of) all other windows in python. Including Games or other programs that seem to "Take over" the computers Graphical processes. Any point in the right direction would be much appreciated...

PS. The OS in question is Windows 7, but a cross platform solution would be appreciated.

A: 

You need the SetWindowPos function from the Win32 API. Something like the following should work (see the API link for more details):

import win32gui, win32con

hwnd = get_my_window_handle()
win32gui.SetWindowPos(hwnd, win32con.HWND_TOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)
ars
Thanks, Seems to be the best option...
Joshkunz
A: 

For a cross-platform solution, you could use wxPython with a wxSTAY_ON_TOP style bit in a main window. I believe that this will give you the behavior you desire on Mac and Unix GUIs as well as Microsoft Windows ones.

Alex Martelli