From: Tony C. <cap...@gm...> - 2007-12-24 08:20:36
|
I'm trying to get my app to always start in the same position each time I run it, instead of some random position. However, the method I've used in other programs doesn't seem to apply in Pythoncard I get the screen width & screen height as follows from win32api import GetSystemMetrics SM_CXSCREEN = 0 SM_CYSCREEN = 1 #self.ScreenWidth = GetSystemMetrics (SM_CXSCREEN) #self.ScreenHeight = GetSystemMetrics (SM_CYSCREEN) then self.position[0] = (self.ScreenWidth - self.size[0]) / 2 self.position[1] = (self.ScreenHeight - self.size[1]) / 2 However, Pythoncard seems ot be overwriting the values I put in self.position. Would someone show me a better way to center a pythoncard app on startup? Merry Christmas Everyone! |