Setting Focus

Hyuga hyugaricdeau at gmail.com
Fri Jun 13 09:34:49 EDT 2008


On Jun 12, 11:04 pm, Gandalf <goldn... at gmail.com> wrote:
> You know these  application like ICQ or winamp which stay at the front
> of the desktop as long as the user doesn't minimize it. I wont to do
> the same with my application in python.
> I still didn't manage to make pywinauto to auto set my window frame in
> focus reliability so I was hoping this will solve my problem.
>
> I'm working with WX lib on 2.5 python on Microsoft Windows XP
>
> if any one {know / heard /think he know /thunk he heard/ sow once
> article that shows} how to do it  I will be happy to know
>
> thank you in advance

I'm not sure if there's a way to do this purely in wx, as it's sort of
a Windows-specific functionality as far as I know.  I know in win32
you can use SetWindowPos() and pass it HWND_TOP (see
http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx).  So you
might have to use win32gui to use SetWindowPos().  You can use
wxWindow.getHandle() to get the HWND reference to pass as the first
argument to SetWindowPos.

Erik



More information about the Python-list mailing list