Windows+Python: Why is the first opened window not shown active?

asmwarrior asmwarrior at gmail.com
Thu Dec 19 06:13:37 CET 2013


On 2013-12-18 17:05, Tim Golden wrote:
> This isn't related to Python specifically: ctypes is just handing the
> values you pass straight on to the underlying DLL (here: user32.dll).
> 
> If you check the MSDN page for the MessageBox function:
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx
> 
> you can see there's a MB_SETFOREGROUND flag with value 0x00010000L which
> seems to do what you want.
> 
> Why the Message box is activated the second time when it isn't the
> first, I have no idea. But it's Windows which is deciding what to do
> there, not Python.
> 
> TJG
Thanks Tim for the reply, indeed this is not an issue in Python, it is related to Windows OS.

Yuanhui Zhang



More information about the Python-list mailing list