[python-win32] PyGUI Window Always Starts Behind Others

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 28 23:03:25 CEST 2011


A PyGUI user has reported a problem on Windows XP whereby an
application's window is not on top when it starts up.

Apparently launching it with with pythonw doesn't entirely
fix the problem, but making it a py2exe application does.

Anyone here have any idea what might be causing this? Is there
something I should do when creating a window to make sure it
appears on top?

-------- Original Message --------
Subject: 	Re: [Pygui] Window Always Starts Behind Others
Date: 	Mon, 28 Mar 2011 10:17:10 -0400
From: 	Mark Melvin <mark.melvin at gmail.com>
To: 	Greg Ewing <greg.ewing at canterbury.ac.nz>
CC: 	pygui at python.org
References:
<AANLkTikrV8QcjKzWzSoieMrtrdmicUeJkdDhjDwCh=ib at mail.gmail.com>
<4D8CDE4A.9080001 at inteli-com.com>
<AANLkTimz1re_yY5y0_Vrtp9aPvrCP1ZfHxCMsghR_knz at mail.gmail.com>
<4D8D331D.4080103 at canterbury.ac.nz>



On Fri, Mar 25, 2011 at 8:28 PM, Greg Ewing <greg.ewing at canterbury.ac.nz
<mailto:greg.ewing at canterbury.ac.nz>> wrote:

     Mark Melvin wrote:

         I'm on Windows XP - 32-bit using the latest PyGUI.


     How are you launching the app?

     If you're not doing so already, try running it with pythonw.exe
     rather than python.exe, or give it a .pyw extension and double
     click.

     --
     Greg


Hi Greg,

I was indeed launching as a console app, and I even had "console" in my
py2exe setup.  I've changed to using the 'windows' version of the
launcher and it seems to have fixed the issue of the GUI launching
behind almost every other window and being hidden from view entirely.
  However, it still pops up behind the console window I launch it from,
and the py2exe'd executable version of the application pops up behind
the Windows Explorer window from which I launched it.

I checked a py2exe'd app I wrote that uses wxPython, and it always pops
up on top when launched.  Could there be a small issue on Windows with
this in PyGUI?

Regards,
Mark.


More information about the python-win32 mailing list