[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Starting Window Position
Ian Mallett wrote:
That seems to work sometimes- the first time. Subsequent attempts to
change the window position fail.
I don't think it was really intended as a way of setting the window
position dynamically. If you are running on Windows you could do it in a
completely non-portable manner, thusly...
hwnd = pygame.display.get_wm_info()["window"]
import win32gui
import win32con
x, y = (200, 200)
win32gui.SetWindowPos(hwnd, 0, x, y, 0, 0, win32con.SWP_NOSIZE |
win32con.SWP_NOZORDER)
Will