Python win32con.SW_MINIMIZE Examples

The following are 5 code examples of win32con.SW_MINIMIZE(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module win32con , or try the search function .
Example #1
Source File: window.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
def AutoRestore(self):
		"If the window is minimised or maximised, restore it."
		p = self.GetWindowPlacement()
		if p[1]==win32con.SW_MINIMIZE or p[1]==win32con.SW_SHOWMINIMIZED:
			self.SetWindowPlacement(p[0], win32con.SW_RESTORE, p[2], p[3], p[4]) 
Example #2
Source File: rescaletime.py    From cross3d with MIT License 5 votes vote down vote up
def minimizeWindows(self, id):
		hwnds = []
		maxHwnd = GetWindowHandle()
		threadID = GetCurrentThreadId()
		EnumThreadWindows( threadID, self.EnumWindowsProc, hwnds)
		pnt = ClientToScreen(id,(5,5))
		pnt = QPoint(pnt[0], pnt[1])
		for hwnd in hwnds:
			if hwnd != maxHwnd:
				rect = GetWindowRect(hwnd)
				if QRect(QPoint(rect[0], rect[1]), QPoint(rect[2], rect[3])).contains(pnt) and IsWindowVisible(hwnd):
#					print hwnd, GetWindowRect(hwnd), GetWindowText(hwnd), GetClassName(hwnd), IsWindowVisible(hwnd)
					self.minimzedWindows.append(hwnd)
					ShowWindow( hwnd, win32con.SW_MINIMIZE ) 
Example #3
Source File: mcplatform.py    From GDMC with ISC License 5 votes vote down vote up
def get_state(self):
        """Return wheter the window is maximized or not, or minimized or full screen."""
        flags, state, ptMin, ptMax, rect = win32gui.GetWindowPlacement(self.base_handler_id)
        if DEBUG_WM:
            print "state", state
        if state == win32con.SW_MAXIMIZE:
            return MAXIMIZED
        elif state == win32con.SW_MINIMIZE:
            return MINIMIZED
        return NORMAL 
Example #4
Source File: main.py    From MouseTracks with GNU General Public License v3.0 5 votes vote down vote up
def minimise(self):
        """Minimise a window."""
        win32gui.ShowWindow(self.hwnd, win32con.SW_MINIMIZE) 
Example #5
Source File: mcplatform.py    From MCEdit-Unified with ISC License 5 votes vote down vote up
def get_state(self):
        """Return wheter the window is maximized or not, or minimized or full screen."""
        flags, state, ptMin, ptMax, rect = win32gui.GetWindowPlacement(self.base_handler_id)
        if DEBUG_WM:
            print "state", state
        if state == win32con.SW_MAXIMIZE:
            return MAXIMIZED
        elif state == win32con.SW_MINIMIZE:
            return MINIMIZED
        return NORMAL