WindowHandlers.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:pytomatic 作者: N0K0 项目源码 文件源码
def move(self, pos, hwnd=None):
        """
        :param pos: A tuple describing the (X,Y,Width,Height) of the window OR
            A tuple describing the (X,Y) coordinates of the top right windows position
        :param hwnd: Move supplied window. If not supplied, then the default window is moved
        :return: The window handle
        """

        if hwnd is None:
            hwnd = self.get_hwnd()

        if len(pos) == 4:
            win32gui.MoveWindow(hwnd, pos[0], pos[1], pos[2], pos[3], 1)
        if len(pos) == 2:
            win_size = self.get_bbox_size()
            win32gui.MoveWindow(hwnd,pos[0],pos[1],win_size[0],win_size[1], 1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号