def __call__(self): if not self.plugin.controlPanel: wx.CallAfter(VirtualHouseFrame, plugin=self.plugin) else: if self.plugin.controlPanel.GetParent().GetPosition() == (-32000, -32000): ShowWindow(self.plugin.controlPanel.GetParent().GetHandle(), SW_RESTORE) wx.CallAfter(self.plugin.controlPanel.GetParent().Raise)
def __call__(self): for hwnd in GetTopLevelOfTargetWindows(): ShowWindow(hwnd, SW_RESTORE) if hwnd in self.plugin.iconDict: try: trayIcon = self.plugin.iconDict[hwnd] del self.plugin.iconDict[hwnd] trayIcon.RemoveIcon() trayIcon.Destroy() except: pass
def __call__(self, hwnd=None): # Gather info about the target window hwnd = GetBestHwnd(hwnd) icon = GetHwndIcon(hwnd) title = unicode(GetWindowText(hwnd)) # If valid, minimize target to the systray if hwnd in eg.WinApi.GetTopLevelWindowList(False) and isinstance( icon, wx._gdi.Icon): trayIcon = wx.TaskBarIcon() trayIcon.SetIcon(icon, title) def OnClick(self, *dummyArgs): # Remove our tray icon and restore the window try: BringHwndToFront(hwnd) except: pass finally: trayIcon.RemoveIcon() trayIcon.Destroy() trayIcon.Bind(wx.EVT_TASKBAR_LEFT_UP, OnClick) ShowWindow(hwnd, 0)
def __call__(self): for hwnd in GetTopLevelOfTargetWindows(): ShowWindow(hwnd, SW_MINIMIZE)
def __call__(self): for hwnd in GetTopLevelOfTargetWindows(): ShowWindow(hwnd, SW_RESTORE)
def __call__(self): hwnd = HandleLch() if hwnd: ShowWindow(hwnd, SW_MINIMIZE)