Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62372

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

Date 2013-12-19 13:13 +0800
From asmwarrior <asmwarrior@gmail.com>
Subject Re: Windows+Python: Why is the first opened window not shown active?
References <52B14248.2010303@gmail.com> <52B16566.6050302@timgolden.me.uk>
Newsgroups comp.lang.python
Message-ID <mailman.4399.1387430611.18130.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Windows+Python: Why is the first opened window not shown active? asmwarrior <asmwarrior@gmail.com> - 2013-12-19 13:13 +0800

csiph-web