[python-win32] BringWindowToTop doesn't work, anyone have try it?

nathon py nathon.py at gmail.com
Sat Oct 23 02:44:28 CEST 2010


guys, thanks a lot, i will try and share the result

2010/10/23 Tim Roberts <timr at probo.com>

> nathon py wrote:
> > #  Let's say a window with title 'D:\\labBufferSpace' exists.
> > #  Code below does not work in DOS, or just double it.
> > #  But it works well in  PythonWin.
> > #  I do not want to run it in PythonWin every time.
> > #  I take it as a bug, and reported it to sourceforge.net
> > <http://sourceforge.net>, did I do that wrong?
> > ########################################################
> > import win32ui,win32con,pythoncom,win32gui,win32process,win32api
> > pwin = win32gui.FindWindow(0,'D:\\labBufferSpace')
> > win32gui.BringWindowToTop(pwin)
>
> If it is a bug, it is a bug in the Win32 API.  This same code also does
> not work in a console app written in C.
>
> Use SetForegroundWindow instead of BringWindowToTop.  That works.
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20101023/912b3524/attachment.html>


More information about the python-win32 mailing list