How can I make a window appear at the bottom of the window stack? Preferably with Tkinter (However, WXPython works too). I'd like it to appear below eve开发者_JAVA百科ry other window. This is in Windows 7, btw.
The pywin32 package can give you access to Windows Scripting functions. For example, select a window by title and move it to the bottom of the Z order:
import win32ui, win32con as w
def MoveToBack(window_name):
flags = w.SWP_NOSIZE | w.SWP_NOMOVE | w.SWP_NOACTIVATE | w.SWP_SHOWWINDOW | w.SWP_ASYNCWINDOWPOS
hwnd = win32ui.FindWindow(None, window_name)
hwnd.SetWindowPos(w.HWND_BOTTOM, (0,0,0,0), flags)
This is obviously a Windows-only solution.
精彩评论