windows.py 文件源码

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

项目:antipong 作者: jFransham 项目源码 文件源码
def set_translation(handle, pos):
    current = get_win_info(handle)

    err = ctypes.windll.user32.MoveWindow(
        handle,
        ctypes.c_int(pos[0]),
        ctypes.c_int(pos[1]),
        ctypes.c_int(current.width),
        ctypes.c_int(current.height),
        ctypes.c_bool(False),
    )

    # Returns 0 on failure
    # https://msdn.microsoft.com/en-us/library/ms633534(VS.85).aspx
    if err == ctypes.c_bool(0):
        raise ctypes.WinError()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号